hydra-typescript (empty) → 0.17.0
raw patch · 10 files changed
+12912/−0 lines, 10 filesdep +basedep +containersdep +hydra-kernel
Dependencies added: base, containers, hydra-kernel, scientific
Files
- CHANGELOG.md +1372/−0
- LICENSE +201/−0
- NOTICE +3/−0
- hydra-typescript.cabal +45/−0
- src/main/haskell/Hydra/Dsl/TypeScript/Syntax.hs +6941/−0
- src/main/haskell/Hydra/TypeScript/Coder.hs +1054/−0
- src/main/haskell/Hydra/TypeScript/Language.hs +298/−0
- src/main/haskell/Hydra/TypeScript/Operators.hs +194/−0
- src/main/haskell/Hydra/TypeScript/Serde.hs +1075/−0
- src/main/haskell/Hydra/TypeScript/Syntax.hs +1729/−0
+ CHANGELOG.md view
@@ -0,0 +1,1372 @@+# Hydra changelog++All notable changes to the Hydra project are documented in this file.++This changelog tracks changes across all Hydra implementations+(Haskell, Java, Python, Scala, TypeScript, Clojure, Common Lisp, Emacs Lisp, Scheme)+and supporting infrastructure.++The format is inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)+and [Apache TinkerPop](https://github.com/apache/tinkerpop/blob/master/CHANGELOG.asciidoc).++Pre-1.0 versions are listed below.+Untagged versions correspond to in-repository version bumps that were not pushed as Git tags or Hackage releases;+they are documented here for completeness.++---++## [0.17.0] - 2026-07-01++Major themes: first-class support for effects and I/O in the kernel, TypeScript and+Scala reaching publishable parity with the other hosts, and continued maturation of+the published-host build model.++### Highlights++- **Effects and I/O** ([#286](https://github.com/CategoricalData/hydra/issues/286),+ [#288](https://github.com/CategoricalData/hydra/issues/288),+ [#494](https://github.com/CategoricalData/hydra/issues/494)): a new `effect` variant+ on `hydra.core.Type` for representing effectful computations; new kernel modules+ `hydra.file` (`FilePath`, `FileType`, `FileStatus`, `FileExtension`), `hydra.time`+ (`Timespec`), and `hydra.error.file`; new primitive libraries `hydra.lib.effects`,+ `hydra.lib.files`, and `hydra.lib.text` with byte-level I/O; and a new+ `EffectfulTestCase` mechanism so the common test suite can exercise effectful+ primitives across hosts.+- **TypeScript is a complete implementation**+ ([#462](https://github.com/CategoricalData/hydra/issues/462)): self-hosts and passes+ the common test suite, with a per-package npm publish pipeline+ ([#492](https://github.com/CategoricalData/hydra/issues/492)).+- **Scala publishing**: per-package Maven Central publish infrastructure+ ([#491](https://github.com/CategoricalData/hydra/issues/491)).+- **Published-host build model**: published mode now compiles the kernel from the+ co-generated `dist/haskell` rather than Hackage, removing the need for a+ `haskell=local` shim ([#500](https://github.com/CategoricalData/hydra/issues/500));+ the oil-and-water principle and cold-build workflow for `dist/haskell` are documented+ ([#376](https://github.com/CategoricalData/hydra/issues/376)).+- **Kernel hygiene**: `uniqueLabel` (apostrophe suffixes) replaced by `chooseUniqueLabel`+ (numeric suffixes) in `hydra.names`+ ([#436](https://github.com/CategoricalData/hydra/issues/436)).++### Implementations++Eight hosts self-host and pass the common test suite across five families: Haskell,+Java, Python, Scala, and the four Lisp dialects (Clojure, Common Lisp, Scheme, Emacs+Lisp), with TypeScript now joining as a complete host/target. Go remains a "head bud"+(the coder still has emission bugs and the head's runtime is largely placeholder; it+does not yet host the test suite).++### New Features++- Translingual cross-reference convention for `doc` strings: doc-escape tags render to+ each host's native doc syntax (Javadoc, Haddock, Sphinx, TSDoc)+ ([#433](https://github.com/CategoricalData/hydra/issues/433)).+- Neo4j JSON-artifact validation demo, exercised across Java, Python, Haskell, and+ TypeScript ([#510](https://github.com/CategoricalData/hydra/issues/510)).++### Improvements++- The Java/Maven publish set now covers every official Hydra target language, one coder+ package per implementation family+ ([#468](https://github.com/CategoricalData/hydra/issues/468)).+- JVM Maven artifact groups are bifurcated to `net.fortytwo.hydra.java` and+ `net.fortytwo.hydra.scala`, so the Java and Scala (and future Clojure) publish sets+ never collide on coordinates+ ([#519](https://github.com/CategoricalData/hydra/issues/519)).+- Host-specific third-party integrations (the former `bindings/` tree) are folded into+ `overlay/`, unifying hand-written host-native source under one tree+ ([#511](https://github.com/CategoricalData/hydra/issues/511)).+- The coder de-parameterizes context and error types, simplifying generated coder+ signatures ([#518](https://github.com/CategoricalData/hydra/issues/518)).+- TypeScript-to-Java generation now emits the `hydra.lib.*` aggregate namespace+ interfaces (`Maps`, `Strings`, etc.)+ ([#499](https://github.com/CategoricalData/hydra/issues/499)).++---++## [0.16.1] - 2026-06-16++Major themes: the first release built by bootstrapping from previously published+packages, the first full 9 × 9 cross-implementation bootstrapping sweep, and+published-package self-containment fixes for the artifacts that bootstrap rests on.++### Highlights++- **Bootstrap from published packages**: the build links the published 0.16.0 hosts+ (Hackage / Maven Central / PyPI) and uses them to build the next version of Hydra,+ resting on 0.16.0's forward-compatibility guarantees — the published-host consume+ model with a `--local-host` shim, used for the first time in a release+ ([#370](https://github.com/CategoricalData/hydra/issues/370)). 0.16.1 still builds+ against **local** Haskell and Python hosts (`hostOverrides`), because the published+ 0.16.0 artifacts it would otherwise consume are the very ones being repaired below.+- **First full 9 × 9 bootstrapping sweep** — every implementation generating every+ other; dozens of cross-host issues surfaced and fixed+ ([#409](https://github.com/CategoricalData/hydra/issues/409), ongoing).+- **Published-package self-containment**: relocate each host's hand-written runtime+ into `overlay/<lang>/hydra-kernel/` so it ships inside the published `hydra-kernel`+ artifact — Python `hydra.python.util` into the wheel+ ([#461](https://github.com/CategoricalData/hydra/issues/461),+ [#472](https://github.com/CategoricalData/hydra/issues/472)) and the Haskell+ authoring DSL + `Libraries`/`Terms` into the sdist+ ([#473](https://github.com/CategoricalData/hydra/issues/473)). Generalized to a+ uniform `overlay/ = transform(packages) + copy(overlay)` model across all hosts+ ([#434](https://github.com/CategoricalData/hydra/issues/434)).+- **Kernel self-containment via generated `hydra.lib.*` registries**: primitive+ names are derived from generated `PrimitiveDefinition` def-modules rather than+ hand-written name strings, in every host+ ([#473](https://github.com/CategoricalData/hydra/issues/473)).+- **In-memory encode/decode synthesis**: derived `hydra.{encode,decode}.*` modules+ are synthesized at build time and excluded from `dist/`, with the synthesizer (not+ inference) as the authority for their annotations+ ([#448](https://github.com/CategoricalData/hydra/issues/448),+ [#476](https://github.com/CategoricalData/hydra/issues/476)).+- **Release hardening**: Apache source-release compliance (signed source archive,+ LICENSE/NOTICE bundling, KEYS) ([#441](https://github.com/CategoricalData/hydra/issues/441)),+ per-package publish orchestrators ([#449](https://github.com/CategoricalData/hydra/issues/449)),+ and packaging-boundary verification gated in CI and at publish time+ ([#472](https://github.com/CategoricalData/hydra/issues/472)).++### New features++- Published-host consume model wired through `bin/sync.sh` for all three hosts+ (`--published-host` default, `--local-host` shim), with the version basis keyed+ off `hydra.json` and the `VERSION` file retired+ ([#370](https://github.com/CategoricalData/hydra/issues/370),+ [#347](https://github.com/CategoricalData/hydra/issues/347)).+- Java and Python coder DSL sources made the sole source of truth; the legacy+ Haskell DSL copies were deleted and cross-package references resolve by name+ ([#346](https://github.com/CategoricalData/hydra/issues/346)).+- Per-host `verify-distribution.sh` self-containment gates (Haskell stages the+ per-package trio and `stack build`s it; Python installs the wheels into an+ isolated venv and imports the kernel modules; Java resolves the published jars+ from an offline consumer), run in CI and as a hard gate in `bin/prepare-release.sh`+ ([#472](https://github.com/CategoricalData/hydra/issues/472)).+- Apache-compliant canonical source archive: signed + checksummed `git archive`+ tarball as the release of record, root `NOTICE`, `KEYS`, and a release-verify CI+ workflow ([#441](https://github.com/CategoricalData/hydra/issues/441)).+- Per-package publish orchestrators `publish-maven.sh` / `publish-pypi.sh` with+ dependency-closure and leaves-first ordering checks+ ([#449](https://github.com/CategoricalData/hydra/issues/449)).+- `hydra-typescript` published as a target Java/Maven + PyPI artifact+ ([#468](https://github.com/CategoricalData/hydra/issues/468)).+- Java coder emits a fluent builder for every generated record type+ ([#465](https://github.com/CategoricalData/hydra/issues/465)); Python coder emits+ per-field `with_<field>` copy-update methods and a fluent builder+ ([#466](https://github.com/CategoricalData/hydra/issues/466)).++### Improvements++- Drop the vestigial `InferenceContext` parameter from the `Primitive.implementation`+ carrier across all hosts; add a graph-free `funT` coder and six `lists` default+ implementations ([#446](https://github.com/CategoricalData/hydra/issues/446)).+- Derive package routing from declared modules; split derived generation into broad+ `mainDslModules` and scoped `mainEncodingModules`+ ([#474](https://github.com/CategoricalData/hydra/issues/474),+ [#475](https://github.com/CategoricalData/hydra/issues/475)).+- Hash JSON content into the per-package input digest; add `digest-check+ refresh-input` and a CI guard that force-regenerates and diffs+ `dist/haskell/hydra-{java,python}` ([#469](https://github.com/CategoricalData/hydra/issues/469)).+- Per-package inference seeds downstream packages from each package's full universe+ while inferring only write targets, fixing `hydra-scala` inference within the CI+ heap budget; declare the `hydra-java` dependency in `hydra-scala` for cold+ ordering ([#470](https://github.com/CategoricalData/hydra/issues/470)).+- Remove the vestigial `Lib/Defaults` registry and empty `defaultLibModules`+ manifest field from all hosts ([#437](https://github.com/CategoricalData/hydra/issues/437)).+- Bundle LICENSE + NOTICE into Java jars (`META-INF`) and Python wheels+ (`dist-info`); declare Apache-2.0 in the Scala build+ ([#441](https://github.com/CategoricalData/hydra/issues/441)).+- Mark lazy parameters on the Scala and Common Lisp primitive registries so eager+ coders thunk correctly ([#453](https://github.com/CategoricalData/hydra/issues/453),+ [#477](https://github.com/CategoricalData/hydra/issues/477),+ [#425](https://github.com/CategoricalData/hydra/issues/425)).+- Staging-loop WIP-commit gate to keep `WIP:` commits off `origin/main`+ ([#466](https://github.com/CategoricalData/hydra/issues/466)).++### Bug fixes++- **Python wheel self-containment**: the `hydra-kernel` wheel now ships+ `hydra.python.util`; gated by a packaging-boundary smoke test in CI and+ `publish-pypi.sh` ([#472](https://github.com/CategoricalData/hydra/issues/472),+ [#461](https://github.com/CategoricalData/hydra/issues/461)).+- **Haskell sdist self-containment**: track the generated `Hydra/Dsl/Terms.hs`+ (was gitignored) so the committed dist exports `ToPrimName`, fixing the cold+ build of the published `hydra-kernel`+ ([#473](https://github.com/CategoricalData/hydra/issues/473)).+- Decode synthesizer threads the fully-applied result type into wrap/record/union+ decoder bodies, so derived decoders emit `DataRow<v>` rather than raw `DataRow`,+ fixing Java and Scala generic decode compilation+ ([#476](https://github.com/CategoricalData/hydra/issues/476)).+- Scala coder emits explicit type arguments for polymorphic non-primitive+ references under a type application (e.g. `requireField`), fixing `Any`-inference+ of curried decoder lambda parameters in `decode/typed`+ ([#434](https://github.com/CategoricalData/hydra/issues/434)).+- Common Lisp and Emacs Lisp: move the hand-written runtime to a dialect-tier path+ so it no longer collides with the generated `hydra.lib.*` def-modules+ ([#434](https://github.com/CategoricalData/hydra/issues/434)).+- Python coder uses the binding `TypeScheme` as the authoritative source for+ parameter and return types ([#488](https://github.com/CategoricalData/hydra/issues/488));+ fixes a duplicate `self` parameter in builders+ ([#478](https://github.com/CategoricalData/hydra/issues/478)).+- Sort term definitions by name in source-file generation so non-Haskell hosts emit+ deterministic alphabetical Haskell output (host-independent of `Maps.elems`+ iteration order) ([#489](https://github.com/CategoricalData/hydra/issues/489)).+- Java coder serializes the `static` method modifier (previously a non-exhaustive+ case) ([#465](https://github.com/CategoricalData/hydra/issues/465)); JavaDoc+ `@link`/`@param` sanitization for strict doclint+ ([#449](https://github.com/CategoricalData/hydra/issues/449)).+- Scala host writer appends a trailing newline when missing, fixing a Lisp-target+ byte mismatch ([#463](https://github.com/CategoricalData/hydra/issues/463)).+- Clojure host: silent wrapping `bigint_to_int{8,16,32,64}` casts per the kernel+ contract ([#483](https://github.com/CategoricalData/hydra/issues/483)); load-order+ and `--kernel-only` filter fixes after kernel renames+ ([#425](https://github.com/CategoricalData/hydra/issues/425)); load the+ `hydra-haskell` baseline for Clojure→Haskell rebuilds+ ([#487](https://github.com/CategoricalData/hydra/issues/487),+ [#460](https://github.com/CategoricalData/hydra/issues/460)).+- Lisp-dialect bootstrap fixes: emit JSON object entries as 2-element `Pair` lists+ rather than dotted cons ([#452](https://github.com/CategoricalData/hydra/issues/452),+ also fixing [#16](https://github.com/CategoricalData/hydra/issues/16)); read+ module names via the correct struct accessor+ ([#471](https://github.com/CategoricalData/hydra/issues/471)); drop stale+ surplus flag arguments from `generate-source-files` calls+ ([#457](https://github.com/CategoricalData/hydra/issues/457),+ [#458](https://github.com/CategoricalData/hydra/issues/458),+ [#464](https://github.com/CategoricalData/hydra/issues/464)); rename eta-wrapped+ projection/unwrap parameters to avoid kernel shadowing+ ([#428](https://github.com/CategoricalData/hydra/issues/428)); propagate a+ non-zero exit from the Scheme test runner on failures and fix Scheme float+ scientific-notation formatting for `|x| >= 1e7`+ ([#447](https://github.com/CategoricalData/hydra/issues/447)).+- Cross-host target dispatch: Common Lisp and Clojure hosts dispatch Scala and+ TypeScript targets ([#482](https://github.com/CategoricalData/hydra/issues/482),+ [#483](https://github.com/CategoricalData/hydra/issues/483)); Scala/Java host+ target-dispatch completions ([#5](https://github.com/CategoricalData/hydra/issues/5),+ [#7](https://github.com/CategoricalData/hydra/issues/7),+ [#17](https://github.com/CategoricalData/hydra/issues/17)).+- TypeScript test runtime reads the kernel JSON field names `body`/`signature`+ (not legacy `term`/`typeScheme`); `lists.nub` dedups by canonical JSON+ ([#485](https://github.com/CategoricalData/hydra/issues/485)).+- Sync robustness: always reassemble `dist/python` under `HYDRA_IN_SYNC` to heal+ partial-dist state ([#480](https://github.com/CategoricalData/hydra/issues/480));+ persist the run dir on bootstrap prep-phase failures+ ([#481](https://github.com/CategoricalData/hydra/issues/481)); complete per-host+ static deps so the bootstrap demo finds fresh dist+ ([#445](https://github.com/CategoricalData/hydra/issues/445)).+- Pin the Python target test interpreter to Python ≥ 3.12+ ([#486](https://github.com/CategoricalData/hydra/issues/486)); Emacs Lisp / Scheme+ target test-runner re-copy robustness+ ([#456](https://github.com/CategoricalData/hydra/issues/456)).+- JavaDoc Pages publish rewritten to build a combined site from the CI-generated+ `dist/java/` artifact, fixing the failure mode where `pages.yml` ran against a+ bare checkout with no `dist/java/` present+ ([#450](https://github.com/CategoricalData/hydra/issues/450)).++### Documentation++- Document the `overlay/` self-containment model, the published-host consume model+ for all three hosts, the `hydra.json` version / host-version basis, and a+ migration-shims recipe ([#434](https://github.com/CategoricalData/hydra/issues/434),+ [#370](https://github.com/CategoricalData/hydra/issues/370),+ [#347](https://github.com/CategoricalData/hydra/issues/347)).+- Document the kernel self-containment / `hydra.lib.*` def-module model and the+ derived-module no-inference invariant+ ([#473](https://github.com/CategoricalData/hydra/issues/473),+ [#466](https://github.com/CategoricalData/hydra/issues/466)); generated Java and+ Python record builders documented in the DSL guides+ ([#465](https://github.com/CategoricalData/hydra/issues/465),+ [#466](https://github.com/CategoricalData/hydra/issues/466)).+- Use absolute GitHub URLs in package READMEs so links resolve when published+ standalone ([#454](https://github.com/CategoricalData/hydra/issues/454)); bundle a+ README into each Python package dir for sdist metadata+ ([#418](https://github.com/CategoricalData/hydra/issues/418)).++---++## [0.16.0] - 2026-06-09++Major themes: primitive-metadata reification, self-hosting coder DSLs with all+eight hosts passing the common test suite, finalized `hydra.packaging`, and a+deep kernel-vocabulary cleanup.++### Highlights++- **`PrimitiveDefinition` and per-namespace registry modules** with host-independent+ specs for every standard-library primitive ([#156](https://github.com/CategoricalData/hydra/issues/156), [#319](https://github.com/CategoricalData/hydra/issues/319)).+- **Self-hosting coder DSLs; all eight hosts pass the common test suite**, including+ the completed TypeScript head ([#344](https://github.com/CategoricalData/hydra/issues/344), [#126](https://github.com/CategoricalData/hydra/issues/126)).+- **Finalized `hydra.packaging`** and a unified `Module.dependencies` field ([#369](https://github.com/CategoricalData/hydra/issues/369), [#354](https://github.com/CategoricalData/hydra/issues/354)).+- **Kernel-vocabulary cleanup**: `maybe`→`optional` across kernel and hosts, plus+ order-preserving JSON objects ([#401](https://github.com/CategoricalData/hydra/issues/401), [#398](https://github.com/CategoricalData/hydra/issues/398)).++### New features++- Reify `PrimitiveDefinition` in `hydra.packaging` with per-namespace `hydra.lib.<sub>` registries ([#156](https://github.com/CategoricalData/hydra/issues/156)).+- Host-independent `comments` specifications for all standard-library primitives ([#319](https://github.com/CategoricalData/hydra/issues/319)).+- Kernel-oriented style checks in `hydra.validate.*` ([#321](https://github.com/CategoricalData/hydra/issues/321), [#351](https://github.com/CategoricalData/hydra/issues/351), [#352](https://github.com/CategoricalData/hydra/issues/352)), on a reshaped validation API ([#320](https://github.com/CategoricalData/hydra/issues/320)).+- Promote the JSON Schema coder to a full DSL coder ([#350](https://github.com/CategoricalData/hydra/issues/350)).+- Transpose coder sources into host-native DSLs for self-hosting ([#344](https://github.com/CategoricalData/hydra/issues/344), [#358](https://github.com/CategoricalData/hydra/issues/358)).+- `Term`-typed annotations replacing `Map<Name, Term>` ([#386](https://github.com/CategoricalData/hydra/issues/386)).+- Language-specific EDSL features on the kernel `Language` ([#233](https://github.com/CategoricalData/hydra/issues/233)).+- Primitive-metadata-driven laziness in eager coders ([#391](https://github.com/CategoricalData/hydra/issues/391)).+- `/test` skill and `bin/test.sh` for target-language test validation ([#387](https://github.com/CategoricalData/hydra/issues/387)).+- Automatic differentiation: a `grad` transform ([#324](https://github.com/CategoricalData/hydra/issues/324)).+- `hydra.show.error.pg` for `InvalidGraphError` ([#374](https://github.com/CategoricalData/hydra/issues/374)).++### Improvements++- Finalize `hydra.packaging`: `Binding`→`TypeDefinition`, `Module`/`Package` `comments`, `moduleName` cleanup ([#369](https://github.com/CategoricalData/hydra/issues/369), [#396](https://github.com/CategoricalData/hydra/issues/396), [#402](https://github.com/CategoricalData/hydra/issues/402), [#404](https://github.com/CategoricalData/hydra/issues/404)).+- Merge `Module.termDependencies`/`typeDependencies` into one `dependencies` field ([#354](https://github.com/CategoricalData/hydra/issues/354)).+- Resolve the `maybe`/`optional` ambiguity across kernel and all hosts ([#401](https://github.com/CategoricalData/hydra/issues/401)).+- Order-preserving JSON objects; order-sensitive `Value` equality ([#398](https://github.com/CategoricalData/hydra/issues/398)).+- Rename `Namespace`→`ModuleName` ([#316](https://github.com/CategoricalData/hydra/issues/316)) and the phantom DSL types to `Typed*` ([#397](https://github.com/CategoricalData/hydra/issues/397)).+- Move from a type-class enum to type-class names ([#275](https://github.com/CategoricalData/hydra/issues/275)).+- Repackage "eval lib" modules as kernel lib modules; promote remaining sources ([#260](https://github.com/CategoricalData/hydra/issues/260), [#355](https://github.com/CategoricalData/hydra/issues/355), [#356](https://github.com/CategoricalData/hydra/issues/356)).+- Reshape `hydra.context` into `InferenceContext` ([#368](https://github.com/CategoricalData/hydra/issues/368)).+- Streamline the Haskell, Java, Python, and Scala syntax models, re-pinning Java to SE 21 and Python to the 3.14 PEG grammar ([#297](https://github.com/CategoricalData/hydra/issues/297)).+- Adopt persistent immutable collections across hosts ([#359](https://github.com/CategoricalData/hydra/issues/359), [#360](https://github.com/CategoricalData/hydra/issues/360), [#361](https://github.com/CategoricalData/hydra/issues/361), [#362](https://github.com/CategoricalData/hydra/issues/362)).+- Migrate underscored kernel definition names to camelCase ([#348](https://github.com/CategoricalData/hydra/issues/348)).+- Tidy qualified/unqualified imports in the Haskell DSL sources ([#308](https://github.com/CategoricalData/hydra/issues/308)).+- Eliminate the `Hydra.Module.Compat` shim ([#315](https://github.com/CategoricalData/hydra/issues/315)).+- Homogenize writer conventions across target languages ([#339](https://github.com/CategoricalData/hydra/issues/339)).+- Disambiguate format-version field naming across JSON metadata ([#412](https://github.com/CategoricalData/hydra/issues/412)).+- Per-package DSL→JSON build with per-package incremental inference ([#381](https://github.com/CategoricalData/hydra/issues/381), [#395](https://github.com/CategoricalData/hydra/issues/395)).+- Prune stale `dist/` outputs; self-heal digests; exclude digests from VCS; reconcile drift; fail loud ([#357](https://github.com/CategoricalData/hydra/issues/357), [#393](https://github.com/CategoricalData/hydra/issues/393), [#405](https://github.com/CategoricalData/hydra/issues/405), [#378](https://github.com/CategoricalData/hydra/issues/378), [#379](https://github.com/CategoricalData/hydra/issues/379), [#392](https://github.com/CategoricalData/hydra/issues/392), [#414](https://github.com/CategoricalData/hydra/issues/414)).+- Accept all valid (host, target) pairs in the generation drivers ([#421](https://github.com/CategoricalData/hydra/issues/421)).+- Move Gradle build infrastructure into `heads/java/`; remove top-level `pixi.toml` ([#384](https://github.com/CategoricalData/hydra/issues/384), [#385](https://github.com/CategoricalData/hydra/issues/385)).+- Eliminate post-generation test patches; fix loader/runner kludges; re-enable test timing ([#307](https://github.com/CategoricalData/hydra/issues/307), [#309](https://github.com/CategoricalData/hydra/issues/309), [#311](https://github.com/CategoricalData/hydra/issues/311)).+- Performance/benchmarks and usability assessments ([#277](https://github.com/CategoricalData/hydra/issues/277), [#283](https://github.com/CategoricalData/hydra/issues/283)).+- Split the Hackage distribution into per-package distributions ([#418](https://github.com/CategoricalData/hydra/issues/418)).++### Bug fixes++- Encode `uint32` JSON literals as numbers, not strings ([#431](https://github.com/CategoricalData/hydra/issues/431)).+- Satisfy or suppress warnings in generated Java ([#349](https://github.com/CategoricalData/hydra/issues/349)).+- Restore JSON parser test cases (polymorphic case handling, ordering fallback) ([#336](https://github.com/CategoricalData/hydra/issues/336)).+- Keep annotations through `termAlternatives`/`typeAlternatives` adaptation ([#353](https://github.com/CategoricalData/hydra/issues/353)).+- Scala host decodes module JSON containing term definitions ([#342](https://github.com/CategoricalData/hydra/issues/342)).+- Java coder: fix exponential `let`-bound `cases` cost ([#372](https://github.com/CategoricalData/hydra/issues/372)) and explicit type args on `PersistentMap.ofEntries` ([#394](https://github.com/CategoricalData/hydra/issues/394)).+- Python-host codegen: drop extra `pyStringToPyStrings` wrapping ([#367](https://github.com/CategoricalData/hydra/issues/367)).+- `escape_literal_char` no longer mangles RDF triples ([#363](https://github.com/CategoricalData/hydra/issues/363)).+- Sync robustness: stale coder JSON, omitted native modules, dead helper, bad source dirs ([#406](https://github.com/CategoricalData/hydra/issues/406), [#400](https://github.com/CategoricalData/hydra/issues/400), [#411](https://github.com/CategoricalData/hydra/issues/411), [#408](https://github.com/CategoricalData/hydra/issues/408)).+- Cross-host self-hosting fixes (Scala, TypeScript, and the four Lisp dialects) ([#422](https://github.com/CategoricalData/hydra/issues/422), [#423](https://github.com/CategoricalData/hydra/issues/423), [#424](https://github.com/CategoricalData/hydra/issues/424), [#429](https://github.com/CategoricalData/hydra/issues/429), [#444](https://github.com/CategoricalData/hydra/issues/444), [#366](https://github.com/CategoricalData/hydra/issues/366), [#389](https://github.com/CategoricalData/hydra/issues/389), [#407](https://github.com/CategoricalData/hydra/issues/407), [#425](https://github.com/CategoricalData/hydra/issues/425), [#426](https://github.com/CategoricalData/hydra/issues/426), [#427](https://github.com/CategoricalData/hydra/issues/427), [#432](https://github.com/CategoricalData/hydra/issues/432), [#438](https://github.com/CategoricalData/hydra/issues/438), [#439](https://github.com/CategoricalData/hydra/issues/439), [#443](https://github.com/CategoricalData/hydra/issues/443)).++### Removed++- Removed the `bigfloat` literal type from `FloatType` and `FloatValue` ([#330](https://github.com/CategoricalData/hydra/issues/330)).+ Arbitrary-precision floating-point values were inconsistently supported+ across host languages (Java/Scala in particular lacked a true IEEE 754+ arbitrary-precision implementation), and nothing in the codebase relied on+ them. `FloatType` and `FloatValue` now have only `float32` and `float64`+ variants. Removed library primitives: `bigfloatToBigint`, `bigfloatToFloat32`,+ `bigfloatToFloat64`, `bigintToBigfloat`, `float32ToBigfloat`,+ `float64ToBigfloat`, `readBigfloat`, `showBigfloat`, `roundBigfloat`. New+ primitives `float32ToFloat64` and `float64ToFloat32` (the latter lossy)+ replace the removed bigfloat-routed conversions.+- Removed `heads/haskell/bin/assemble-hackage-sdist.sh` ([#418](https://github.com/CategoricalData/hydra/issues/418)), the 0.15-era+ bridge that flattened the multi-source-dir Haskell head into one self-contained+ `hydra` sdist. Superseded by the per-package assembler (see Improvements).++### Documentation++- Comprehensive documentation refresh for 0.16 ([#383](https://github.com/CategoricalData/hydra/issues/383))+ spanning nine tracks across READMEs, `docs/`, the wiki, CLAUDE.md, and+ in-source kernel comments.+- New `docs/json-format.md` reference describing the canonical JSON wire format+ (tagged-union duality, optional-field rules, IEEE 754 sentinels, integer+ threshold).+- New wiki pages: `Design` (rationale behind each major choice) and `Inference`+ (HM type inference with class constraints).+- Cross-checked every prose doc against current code; corrected drift in+ primitive-checking sections of `docs/recipes/maintenance.md`, the `Primitive`+ shape in `docs/implementation.md` and `docs/recipes/adding-primitives.md`,+ and the build-system narrative.+- Wove motivation ("the why") through the existing doc surface rather than+ collecting it into separately-titled sidebars; landed an inference-overview+ centerpiece on the wiki ([#377](https://github.com/CategoricalData/hydra/issues/377)).+- Aligned doc vocabulary with the LambdaGraph paper and the literature review+ for the design space Hydra inhabits.+- Net-new READMEs for `packages/hydra-kernel`, `packages/hydra-ext`,+ `packages/hydra-coq`, and `packages/hydra-wasm`; top-level `README.md`+ now carries a canonical packages table.+- Audited and refreshed the Claude surface: CLAUDE.md "Where to look up X"+ table extended with rows for `docs/getting-started.md`, `docs/json-format.md`,+ and the `Design` / `Inference` wiki pages; hard-rules block reordered by+ violation frequency; `claude/pitfalls.md` superseded entries folded into+ `docs/troubleshooting.md` / recipes.+- Project-descriptor strings reviewed and aligned across 24 build / packaging+ files (Hackage synopsis, Maven Central description, PyPI / conda-forge+ classifiers, Hydra-format `package.json` files).+- `docs/index.html` (the GitHub Pages landing page) refreshed with audience+ hops into wiki Concepts / Design, `docs/getting-started.md`, and the GitHub+ repo, plus the full published-artifact list across Hackage, Maven Central,+ PyPI, and conda-forge.+- In-source kernel-code rationale comments added at key Sources sites covering+ injection / pair / either / unit-void duality, error taxonomy, variant+ records, inference-context threading, validation profiles, reduction state,+ lexical filters, name mangling, scoping, variable handling, defaults+ integration, and Tarjan SCC choice rationale. JSON encode/decode modules+ cross-reference `docs/json-format.md`.+- Filed `Primitive.implementation` carrier-simplification follow-up+ ([#446](https://github.com/CategoricalData/hydra/issues/446))+ to drop the unused `InferenceContext` and `Graph` parameters once the+ `Lib/Defaults/` integration ([#437](https://github.com/CategoricalData/hydra/issues/437))+ lands.++---++## [0.15.0] - 2026-04-29++A structural-cleanup release.+The repository is reorganized into a three-tree+`packages/` (DSL sources) / `heads/` (per-host runtime) / `dist/` (generated output)+layout ([#290](https://github.com/CategoricalData/hydra/issues/290)), the kernel is simplified ([#251](https://github.com/CategoricalData/hydra/issues/251), [#292](https://github.com/CategoricalData/hydra/issues/292), [#332](https://github.com/CategoricalData/hydra/issues/332)), and Java + Python now+ship as per-package publishable artifacts on Maven Central / PyPI / conda-forge+([#305](https://github.com/CategoricalData/hydra/issues/305)).+Incremental, content-hash-based caches accelerate the sync pipeline ([#247](https://github.com/CategoricalData/hydra/issues/247)).+Three new generation-only targets — Coq ([#326](https://github.com/CategoricalData/hydra/issues/326)), WebAssembly ([#325](https://github.com/CategoricalData/hydra/issues/325)), and an+automatic-differentiation demo ([#324](https://github.com/CategoricalData/hydra/issues/324)) — are in progress as Claude collaborations.++### Highlights++- **Three-tree repository layout**: `packages/` (DSL), `heads/` (host runtime),+ `dist/` (generated) ([#290](https://github.com/CategoricalData/hydra/issues/290)).+- **Per-package distributions** for Java (4 Maven artifacts) and Python (5 wheels):+ `hydra-kernel`, `hydra-pg`, `hydra-rdf`, `hydra-{java,python}`, plus `hydra-ext`+ on PyPI ([#305](https://github.com/CategoricalData/hydra/issues/305)).+- **Kernel simplifications**: `Function`/`Elimination` removed ([#332](https://github.com/CategoricalData/hydra/issues/332)),+ `FunctionPrimitive` removed ([#251](https://github.com/CategoricalData/hydra/issues/251)), `Hydra.Ext.*` prefix retired ([#331](https://github.com/CategoricalData/hydra/issues/331)),+ `Context` error wrapper gone ([#292](https://github.com/CategoricalData/hydra/issues/292)).+- **Incremental caches** across the sync pipeline; ~70x speedup on no-op resync ([#247](https://github.com/CategoricalData/hydra/issues/247)).+- **JSON kernel format v1** with formal wire-format spec and four-field rename ([#343](https://github.com/CategoricalData/hydra/issues/343)).+- **Three new generation-only targets** (in progress): Coq ([#326](https://github.com/CategoricalData/hydra/issues/326)), WebAssembly ([#325](https://github.com/CategoricalData/hydra/issues/325)),+ automatic-differentiation demo ([#324](https://github.com/CategoricalData/hydra/issues/324)).++### New features++- Per-package distributions ([#305](https://github.com/CategoricalData/hydra/issues/305)): standalone Maven / PyPI / conda-forge builds,+ generated `build.gradle` / `pyproject.toml` per package, transitive dep resolution.+- JSON kernel format v1 ([#343](https://github.com/CategoricalData/hydra/issues/343)): formal spec at `docs/json-format.md`,+ four-field rename to `typeScheme`, `Module` field reorder, `formatVersion` stamp.+- `decimal` literal type in the kernel ([#338](https://github.com/CategoricalData/hydra/issues/338)) across all hosts.+- Type-directed JSON encoder with idiomatic optional encoding ([#314](https://github.com/CategoricalData/hydra/issues/314), [#318](https://github.com/CategoricalData/hydra/issues/318)).+- Incremental type inference plus content-hash caches ([#247](https://github.com/CategoricalData/hydra/issues/247)).+- Coq generation target ([#326](https://github.com/CategoricalData/hydra/issues/326), in progress): `hydra-coq` package, 131/131 `.v` files pass `coqc`.+- WebAssembly target ([#325](https://github.com/CategoricalData/hydra/issues/325), in progress): `hydra-wasm` package, M4 closure mechanism.+- Automatic-differentiation demo ([#324](https://github.com/CategoricalData/hydra/issues/324), in progress): symbolic source-to-source.+- `hydra.show.error` module ([#265](https://github.com/CategoricalData/hydra/issues/265)): consolidated error-message builders.+- `hydra.lib.maybes.toList` primitive ([#257](https://github.com/CategoricalData/hydra/issues/257)).+- NaN / Inf round-tripping through JSON and per-language serdes ([#312](https://github.com/CategoricalData/hydra/issues/312), [#318](https://github.com/CategoricalData/hydra/issues/318), [#330](https://github.com/CategoricalData/hydra/issues/330)).+- Typeclass inference test group ([#274](https://github.com/CategoricalData/hydra/issues/274)).+- Term and type linters ([#232](https://github.com/CategoricalData/hydra/issues/232)).+- Validation for modules and graphs ([#155](https://github.com/CategoricalData/hydra/issues/155)).+- User-defined-function (UDF) support and DSL-vs-primitive overrides+ ([#62](https://github.com/CategoricalData/hydra/issues/62), [#63](https://github.com/CategoricalData/hydra/issues/63), [#102](https://github.com/CategoricalData/hydra/issues/102), [#158](https://github.com/CategoricalData/hydra/issues/158)).+- Stale-source detection across sync entrypoints ([#228](https://github.com/CategoricalData/hydra/issues/228)).++### Improvements++- Sync infrastructure: matrix tool, per-package orchestrator, per-language wrappers ([#290](https://github.com/CategoricalData/hydra/issues/290)).+- TestGraph post-generation patches eliminated; DSL emits `TestEnv` refs directly.+- Minimized standard imports in generated Haskell ([#161](https://github.com/CategoricalData/hydra/issues/161)); improved auto-aliases ([#322](https://github.com/CategoricalData/hydra/issues/322)).+- Removed kernel term dependencies from the interpreter ([#257](https://github.com/CategoricalData/hydra/issues/257)).+- Removed `Graph` and `Context` arguments from primitive implementations ([#266](https://github.com/CategoricalData/hydra/issues/266)).+- Refactored kernel term modules: split rewriting/schemas, renamed show.meta → codegen,+ moved `Coder` to `coders`, merged `extract.helpers` ([#221](https://github.com/CategoricalData/hydra/issues/221)).+- Removed Aeson and HsYAML dependencies; YAML coder moved to `hydra-ext` ([#261](https://github.com/CategoricalData/hydra/issues/261)).+- Lisp recursive let bindings via SCC ([#341](https://github.com/CategoricalData/hydra/issues/341)); parenthesis cleanup ([#84](https://github.com/CategoricalData/hydra/issues/84)).+- Everything-to-everything bootstrapping demo ([#254](https://github.com/CategoricalData/hydra/issues/254)).+- Re-enabled skipped Python tests; `disabledForPython` retired ([#263](https://github.com/CategoricalData/hydra/issues/263)).+- Promoted host-specific code in `packages/` into per-head locations ([#337](https://github.com/CategoricalData/hydra/issues/337)).+- Migrated `hydra.common` Java module out ([#10](https://github.com/CategoricalData/hydra/issues/10)).+- Test infrastructure unification under `UniversalTestCase` ([#246](https://github.com/CategoricalData/hydra/issues/246)).+- Default property graph → RDF mapping ([#296](https://github.com/CategoricalData/hydra/issues/296)).+- 13 unsafe partial primitives replaced with `Maybe`-returning alternatives ([#201](https://github.com/CategoricalData/hydra/issues/201)).+- Java generated code uses standard `java.util` collection interfaces ([#313](https://github.com/CategoricalData/hydra/issues/313)).+- `Term.union` renamed to `Term.inject` ([#334](https://github.com/CategoricalData/hydra/issues/334)).+- Inconsistencies in domain DSLs cleaned up ([#219](https://github.com/CategoricalData/hydra/issues/219)).+- Coder packages moved out of hydra-haskell ([#182](https://github.com/CategoricalData/hydra/issues/182)).+- Java package-naming scheme revised ([#223](https://github.com/CategoricalData/hydra/issues/223)).+- Decimal used (instead of bigfloat) for JSON numbers ([#340](https://github.com/CategoricalData/hydra/issues/340)).+- Hydra kernel moved out of hydra-haskell ([#282](https://github.com/CategoricalData/hydra/issues/282)).++### Bug fixes++- `substInTypeScheme` capture-unsafe substitution under nested forall binders.+- Java `Float64` arithmetic primitives corrected for current `PrimitiveFunction` API.+- Clojure decimal handling: value-based equality, `BigInteger` return from `decimal_to_bigint`.+- Scheme runtime R7RS imports for `sets.scm` / `maps.scm` / `eithers.map_set`.+- Python coder defaults corrected from `Py.Name` to `Py.Expression`.+- Scala host JSON-decode failure on modules containing term definitions ([#342](https://github.com/CategoricalData/hydra/issues/342)).+- Lisp coder mutually-recursive let bindings for Clojure ([#341](https://github.com/CategoricalData/hydra/issues/341)).++### Documentation++- Documentation refresh for the 0.15 packaging restructure ([#290](https://github.com/CategoricalData/hydra/issues/290), [#331](https://github.com/CategoricalData/hydra/issues/331)); CLAUDE.md,+ READMEs, recipes, demos, and seven wiki pages updated.+- Code-generation recipe rewritten for the per-package dist layout ([#282](https://github.com/CategoricalData/hydra/issues/282)).+- New `maintenance.md` recipe consolidates non-source-file scans, stale generated+ detection, design-violation checks, and freshness checks.+- Documentation style guide added at `docs/documentation-style-guide.md`.+- Cross-worktree messaging protocol documented in CLAUDE.md.+- Decimal type documented in the lexicon and per-language READMEs ([#338](https://github.com/CategoricalData/hydra/issues/338)).+- JSON encoding format docs updated for idiomatic optional encoding ([#314](https://github.com/CategoricalData/hydra/issues/314)).++---++## [0.14.1] - 2026-03-30++Patch release.+Regenerates all implementations after a fix to the group eval primitive ([#281](https://github.com/CategoricalData/hydra/issues/281)),+and relocates the property-graph and RDF/SHACL "ext" modules into hydra-java and hydra-python.++### Improvements++- Moved PG, RDF, and SHACL ext modules from hydra-ext into hydra-java and hydra-python.++### Bug fixes++- Group eval primitive fix; all targets regenerated ([#281](https://github.com/CategoricalData/hydra/issues/281)).+- JavaDoc HTML-entity escaping in generated `DestructuringPattern.java`.++---++## [0.14.0] - 2026-03-29++Major release adding four new complete Hydra implementations — Scala ([#273](https://github.com/CategoricalData/hydra/issues/273)),+Clojure ([#278](https://github.com/CategoricalData/hydra/issues/278)), Common Lisp, and Scheme — bringing the total to seven bootstrapping hosts+(plus Emacs Lisp, which passes the test suite but does not yet participate in bootstrapping).+Also includes kernel simplifications, an Avro bidirectional coder ([#301](https://github.com/CategoricalData/hydra/issues/301)),+eval primitives ([#281](https://github.com/CategoricalData/hydra/issues/281)), new demos, and significant performance work on the Scheme host.++### Highlights++- **Four new complete implementations**: Hydra-Scala ([#273](https://github.com/CategoricalData/hydra/issues/273)), Hydra-Clojure ([#278](https://github.com/CategoricalData/hydra/issues/278)),+ Hydra-Common Lisp, and Hydra-Scheme pass the common test suite and can serve as+ bootstrapping hosts.+ The four Lisp dialects share a single coder and serializer.+- **Kernel simplifications**: removed `RowType`/`WrappedType` ([#82](https://github.com/CategoricalData/hydra/issues/82)),+ unified `Graph`/`TypeContext`/`InferenceContext` ([#192](https://github.com/CategoricalData/hydra/issues/192)),+ replaced `Module.elements` with `Module.definitions` ([#214](https://github.com/CategoricalData/hydra/issues/214)),+ consolidated error types ([#268](https://github.com/CategoricalData/hydra/issues/268)), and promoted all staging modules to DSL sources ([#267](https://github.com/CategoricalData/hydra/issues/267)).+- **Avro bidirectional coder** ([#301](https://github.com/CategoricalData/hydra/issues/301)) with property graph pipeline demo.+- **Scheme bootstrap performance**: 58 minutes → 5.7 minutes via O(1) vhash data structures+ and IEEE 754 float precision fixes.++### Breaking changes++- Removed legacy adapter framework; replaced by the staging-promoted variant ([#236](https://github.com/CategoricalData/hydra/issues/236), [#295](https://github.com/CategoricalData/hydra/issues/295)).+- Replaced legacy Flow monad with Either ([#245](https://github.com/CategoricalData/hydra/issues/245)).+- Removed `Module.elements`; use `Module.definitions` ([#214](https://github.com/CategoricalData/hydra/issues/214)).+- Removed `RowType` and `WrappedType` ([#82](https://github.com/CategoricalData/hydra/issues/82)).+- Renamed `hydra.accessors` to `hydra.paths` ([#271](https://github.com/CategoricalData/hydra/issues/271)).+- Renamed `hydra.tarjan` and merged into `hydra.sorting` ([#220](https://github.com/CategoricalData/hydra/issues/220)).+- Merged `hydra.constraints` into `hydra.query` ([#272](https://github.com/CategoricalData/hydra/issues/272)).+- Moved `hydra.workflow` to hydra-ext ([#270](https://github.com/CategoricalData/hydra/issues/270)).+- Consolidated `hydra.compute` into `hydra.util` ([#269](https://github.com/CategoricalData/hydra/issues/269)).+- Removed `hydra.describe` ([#216](https://github.com/CategoricalData/hydra/issues/216)) and types from `hydra.mantle` ([#217](https://github.com/CategoricalData/hydra/issues/217)).+- Replaced `OtherError` with task-specific error types ([#268](https://github.com/CategoricalData/hydra/issues/268)).+- Java: lowered minimum Java version to 11 ([#249](https://github.com/CategoricalData/hydra/issues/249)).+- Java: `Pair` replaces `Tuple2` ([#252](https://github.com/CategoricalData/hydra/issues/252)); `Comparable` implemented for generated classes ([#131](https://github.com/CategoricalData/hydra/issues/131)).++### New features++- Hydra-Scala ([#273](https://github.com/CategoricalData/hydra/issues/273)): complete implementation, sbt/Scala 3, 3043 tests.+- Hydra-Lisp: Clojure ([#278](https://github.com/CategoricalData/hydra/issues/278)), Common Lisp, Emacs Lisp, Scheme — four dialects,+ one coder. CI workflows for Clojure, Common Lisp, and Scheme.+- Avro bidirectional coder ([#301](https://github.com/CategoricalData/hydra/issues/301)) with demo.+- Eval primitives ([#281](https://github.com/CategoricalData/hydra/issues/281)): Logic, Equality, Math, collections, and Groups.+- Generated DSL modules ([#180](https://github.com/CategoricalData/hydra/issues/180)): `hydra.dsls` generates DSL helpers from type modules.+- New demos: GraphQL+JSON ([#279](https://github.com/CategoricalData/hydra/issues/279)), PG validation ([#284](https://github.com/CategoricalData/hydra/issues/284)), SHACL ([#294](https://github.com/CategoricalData/hydra/issues/294)), Avro+PG.+- Packaging module ([#290](https://github.com/CategoricalData/hydra/issues/290)): `hydra.packaging` with `Package` type and validation.+- New primitives: `lists.foldr` ([#280](https://github.com/CategoricalData/hydra/issues/280)), `maybes.toList`, float rounding ([#264](https://github.com/CategoricalData/hydra/issues/264), [#285](https://github.com/CategoricalData/hydra/issues/285)).+- Cross-language benchmarking suite ([#234](https://github.com/CategoricalData/hydra/issues/234)).+- Limited typeclass inference ([#164](https://github.com/CategoricalData/hydra/issues/164)).+- Standardized validation patterns across modules ([#291](https://github.com/CategoricalData/hydra/issues/291)).++### Improvements++- Promoted all staging modules to DSL sources ([#267](https://github.com/CategoricalData/hydra/issues/267)).+- Removed legacy adapters, JSON/YAML coders, grammar framework ([#236](https://github.com/CategoricalData/hydra/issues/236), [#295](https://github.com/CategoricalData/hydra/issues/295)).+- Java: efficient immutable data structures ([#193](https://github.com/CategoricalData/hydra/issues/193)); flattened term naming.+- Java: hidden specialized collection classes in type-level files ([#313](https://github.com/CategoricalData/hydra/issues/313)).+- Inference error messages improved ([#231](https://github.com/CategoricalData/hydra/issues/231)).+- Combined nested let bindings in the Haskell coder ([#248](https://github.com/CategoricalData/hydra/issues/248)).+- Simplified `hydra.adapt.simple` ([#255](https://github.com/CategoricalData/hydra/issues/255)).+- Removed Haskell operators dependency from tests ([#288](https://github.com/CategoricalData/hydra/issues/288)).+- Regression tests for non-Haskell/Java coders ([#85](https://github.com/CategoricalData/hydra/issues/85)).+- Regex support added ([#293](https://github.com/CategoricalData/hydra/issues/293)).+- `hydra.annotations.isNativeType` revisited ([#214](https://github.com/CategoricalData/hydra/issues/214)).+- Migrated grammar-generated models ([#295](https://github.com/CategoricalData/hydra/issues/295)).+- `<<= -shouldBe-> <<~` operator change ([#276](https://github.com/CategoricalData/hydra/issues/276)).+- Minimize Generation.hs ([#225](https://github.com/CategoricalData/hydra/issues/225)).+- Implemented missing Flows primitives ([#183](https://github.com/CategoricalData/hydra/issues/183)).+- Removed JavaDocs from the repository ([#262](https://github.com/CategoricalData/hydra/issues/262)).+- Floating-point test portability fixes for Linux CI ([#264](https://github.com/CategoricalData/hydra/issues/264), [#285](https://github.com/CategoricalData/hydra/issues/285)).+- Moved YAML coder to hydra-ext ([#224](https://github.com/CategoricalData/hydra/issues/224)).+- Minimized native Python and Java primitives in favor of DSL implementations ([#244](https://github.com/CategoricalData/hydra/issues/244)).+- Removed the `disabledForPython` test tag ([#250](https://github.com/CategoricalData/hydra/issues/250)).++### Release tooling++- 0.14 release tracking ([#304](https://github.com/CategoricalData/hydra/issues/304)).++### Documentation++- Thorough cleanup of user documentation ([#302](https://github.com/CategoricalData/hydra/issues/302), [#303](https://github.com/CategoricalData/hydra/issues/303)).+- Coding style guide added to wiki.+- Updated 'new implementation' recipe with learnings from Clojure head ([#278](https://github.com/CategoricalData/hydra/issues/278)).++---++## [0.13.0] - 2026-02-27++Major release completing Hydra-Python ([#66](https://github.com/CategoricalData/hydra/issues/66)) and Hydra-Java ([#166](https://github.com/CategoricalData/hydra/issues/166)) as self-hosting Hydra implementations+and demonstrating mutual self-hosting across all three languages.+Significant improvements to type inference, type checking, rewriting, and adaptation.+New language features include first-class Either types, typeclass inference, binary data support,+and a native JSON parser/writer.+Comprehensive tooling for cross-implementation bootstrapping+and provisional support for Go, Rust, and JavaScript targets.++### Highlights++- **Mutual self-hosting across three implementations**: Hydra is now fully self-hosting+ in Haskell ([#179](https://github.com/CategoricalData/hydra/issues/179)), Java, and Python, and can cross-generate between every combination+ of host and target language (9 paths total).+- **Hydra-Java is complete** ([#166](https://github.com/CategoricalData/hydra/issues/166)): all kernel and generation tests pass.+- **Hydra-Python is complete** ([#66](https://github.com/CategoricalData/hydra/issues/66)): 100% test parity with Haskell.+- **Language coders promoted into the Hydra kernel** ([#176](https://github.com/CategoricalData/hydra/issues/176)): Haskell, Java, and Python+ coders are now defined as Hydra DSL modules, making them self-hosting.+- **Either type support** ([#210](https://github.com/CategoricalData/hydra/issues/210)) with full inference, checking, and library support.+- **Native JSON parser and writer** ([#188](https://github.com/CategoricalData/hydra/issues/188), [#243](https://github.com/CategoricalData/hydra/issues/243), [#253](https://github.com/CategoricalData/hydra/issues/253)): Hydra's own JSON parser and writer+ replace the Aeson dependency; bootstrap-from-JSON architecture for cross-implementation+ code generation.++### Breaking changes++- Renamed `Optional` to `Maybe` throughout the codebase ([#204](https://github.com/CategoricalData/hydra/issues/204)):+ `hydra.lib.optionals` → `hydra.lib.maybes`; all `optional` variants renamed to `maybe`.+- Removed unlabeled product and sum types; replaced with pair types ([#212](https://github.com/CategoricalData/hydra/issues/212)).+- Renamed `hydra.core.TypedTerm` to `hydra.core.TypeApplicationTerm`.+- Renamed `hydra.json` to `hydra.json.model`.+- Renamed `hydra.lib.maps.remove` to `hydra.lib.maps.delete`.+- Removed deprecated `hydra.decoding` module.+- Removed old `hydra.mantle.Either` type (replaced by core `Either`).+- Removed `hydra.lib.tuples` library.+- Removed C# coder stub (C# syntax model remains).+- DSL syntax migration: removed `OverloadedStrings` for term expressions ([#238](https://github.com/CategoricalData/hydra/issues/238)).+- Removed `Hydra.Dsl.ShorthandTypes` ([#222](https://github.com/CategoricalData/hydra/issues/222)).++### New features++- Self-hosting in Haskell ([#179](https://github.com/CategoricalData/hydra/issues/179)) and full mutual cross-generation (Haskell ↔ Java ↔ Python).+- New bootstrapping demo validating all 9 paths across 249 modules.+- Promoted Haskell, Java, and Python coders from staging code into Hydra DSL sources ([#176](https://github.com/CategoricalData/hydra/issues/176)).+- JSON-as-source-of-truth bootstrapping architecture ([#243](https://github.com/CategoricalData/hydra/issues/243), [#253](https://github.com/CategoricalData/hydra/issues/253)):+ new executables and scripts enabling `bootstrap-from-json` for cross-implementation+ code generation.+- Generated term encoders and decoders replace legacy hand-coded modules ([#47](https://github.com/CategoricalData/hydra/issues/47)).+- Hydra-Python completion ([#66](https://github.com/CategoricalData/hydra/issues/66)): restructured project layout with `src/main` and+ `src/gen-main` ([#191](https://github.com/CategoricalData/hydra/issues/191)); full library implementations including `hydra.lib.flows`;+ `@lru_cache` optimization for nullary bindings; PyPy compatibility.+- Hydra-Java completion ([#166](https://github.com/CategoricalData/hydra/issues/166)): all kernel and generation tests pass; deep changes+ to Java coder; `Lazy` utility class for delayed evaluation; array-type support+ in Java serde; tail-call optimization in the Java coder; `Tuple` implements `Comparable`.+- Either type ([#210](https://github.com/CategoricalData/hydra/issues/210)): `EitherType`, `either` term constructor, `hydra.lib.eithers` library+ with `either`, `map`, `mapList`, `mapMaybe`, `bimap`, `bind`, `fromLeft`, `fromRight`,+ `isLeft`, `isRight`, `lefts`, `rights`, `partitionEithers`.+- Pair type as a core construct ([#211](https://github.com/CategoricalData/hydra/issues/211)).+- Void type ([#237](https://github.com/CategoricalData/hydra/issues/237)): uninhabited `void` type as the dual of `unit`; type-level only.+- Native JSON parser and writer ([#188](https://github.com/CategoricalData/hydra/issues/188), [#242](https://github.com/CategoricalData/hydra/issues/242)):+ bidirectional JSON encoder/decoder; replaces the Aeson dependency;+ cross-checked via a special test runner.+- Typeclass inference ([#164](https://github.com/CategoricalData/hydra/issues/164)):+ type schemes with typeclass constraints via `TypeVariableMetadata`;+ typeclass metadata on primitive definitions; Haskell coder uses typeclass info.+- Binary/`ByteString` support ([#172](https://github.com/CategoricalData/hydra/issues/172)): binary data via `ByteString` instead of `String`;+ Haskell coder uses `Data.ByteString`; new `binaryToBytes` primitive.+- Parser combinators: new `hydra.parsing` module with combinator types and DSL.+- Higher-order primitive interpreter ([#198](https://github.com/CategoricalData/hydra/issues/198)): all primitives are fully interpretable+ across all three implementations; legacy `requiresInterp` tag removed.+- Let hoisting and flattening: hoisting polymorphic let terms;+ refined hoisting for monomorphic bindings inside polymorphic ones;+ more efficient `liftLambdaAboveLet` ([#202](https://github.com/CategoricalData/hydra/issues/202));+ case-statement hoisting ([#241](https://github.com/CategoricalData/hydra/issues/241)); subterm hoisting helpers.+- Provisional language targets: Go ([#65](https://github.com/CategoricalData/hydra/issues/65)), Rust (with experimental type-level coder),+ JavaScript (syntax model, serde, DSL, generated sources), and Java/Python syntax DSLs.+- New adapter framework ([#236](https://github.com/CategoricalData/hydra/issues/236)): all external coders refactored+ (Haskell, YAML, Scala, JSON Schema, C++, PDL, Protobuf, GraphQL).+- Compact labeled records and variants ([#122](https://github.com/CategoricalData/hydra/issues/122)).+- New primitives:+ `hydra.lib.lists.find`, `hydra.lib.lists.partition`,+ `hydra.lib.flows.withDefault`, `hydra.lib.flows.foldl`,+ `hydra.lib.math.{max,min,abs,pred,signum,succ,even,odd}`,+ `hydra.lib.pairs.bimap`, `hydra.lib.eithers.bind`,+ `hydra.lib.literals.binaryToBytes`, complete `readXxx`/`showXxx` families,+ `hydra.lexical.chooseUniqueName`, `neg` renamed to `negate`,+ full floating-point math primitives in Python ([#208](https://github.com/CategoricalData/hydra/issues/208)).+- DeepCore DSL: a layer one level deeper than the Meta DSLs,+ for programs that construct programs that construct terms.+- `typeOf` implementation ([#168](https://github.com/CategoricalData/hydra/issues/168)).+- Implement `Comparable` for generated Java classes ([#131](https://github.com/CategoricalData/hydra/issues/131)); update of Hydra-Java ([#166](https://github.com/CategoricalData/hydra/issues/166)).+- Compact labeled records exploration ([#122](https://github.com/CategoricalData/hydra/issues/122)).+- Comparison primitives without typeclasses ([#187](https://github.com/CategoricalData/hydra/issues/187)).+- Investigated core support for Either and Flow monads ([#200](https://github.com/CategoricalData/hydra/issues/200)).++### Improvements++- Type system:+ - Refactored `hydra.inference` to create new module `hydra.checking`.+ - Inference checks after unification to prevent schema names from being unified+ with inferred type variables.+ - Type application terms preserved when preparing application terms for Python.+ - Sanity-check tuple projection index against arity during inference.+ - Bind lost type variables in term annotations.+ - Made `extendTypeContextForLet` tolerant of untyped bindings.+- Code generation:+ - Python: support for deeply-nested match statements; more complete `let` support;+ Pythonic syntax for polymorphic function definitions; refinements for complex+ case-hoisting scenarios; performance improvements ([#209](https://github.com/CategoricalData/hydra/issues/209), [#239](https://github.com/CategoricalData/hydra/issues/239), [#240](https://github.com/CategoricalData/hydra/issues/240)); inline+ let/case rewriting for Python targets ([#203](https://github.com/CategoricalData/hydra/issues/203)).+ - Java: method declaration style consistent with calling style.+ - Haskell: standardized typeclass names.+ - Increased maximum trace depth to support more complex sources.+- Common test suite promotion: all tests promoted into a shared, implementation-independent+ test kernel ([#213](https://github.com/CategoricalData/hydra/issues/213)).+- Statically-compiled test suite in Haskell ([#207](https://github.com/CategoricalData/hydra/issues/207)).+- Included all Hydra kernel types in test schema ([#205](https://github.com/CategoricalData/hydra/issues/205)).+- Reorganized Haskell DSL definitions; standardized imports.+- Added TODO comments to all unsafe primitives ([#201](https://github.com/CategoricalData/hydra/issues/201)).+- New `rewriteAndFoldTerm` utility for simultaneous rewriting and folding.+- Lexical helper for dereferencing schema types through aliases.+- Made JSON parser lazy with new `lazy` parser combinator.+- More efficient substitution helpers for empty substitutions.+- Precomputed type/inference context in kernel test runner for performance.+- Property graph encoding and decoding modules promoted into DSL.+- `hydra.tabular` and `hydra.pg.graphson` modules promoted into DSL.+- `hydra.show.*` modules generated into Java and Python.+- Aligned epsilon encoding with the LambdaGraph spec ([#89](https://github.com/CategoricalData/hydra/issues/89)).+- Fixed asymmetry of introductions and eliminations ([#86](https://github.com/CategoricalData/hydra/issues/86), [#134](https://github.com/CategoricalData/hydra/issues/134)).+- Minimized inferred type annotations ([#114](https://github.com/CategoricalData/hydra/issues/114)).+- Investigated combining products with records, sums with unions ([#196](https://github.com/CategoricalData/hydra/issues/196), [#212](https://github.com/CategoricalData/hydra/issues/212)).+- Refined type reduction in adapters ([#144](https://github.com/CategoricalData/hydra/issues/144)).+- Investigation of unification issues ([#163](https://github.com/CategoricalData/hydra/issues/163)).+- Refactored RowType ([#82](https://github.com/CategoricalData/hydra/issues/82)).+- LLM-assisted PG schemas and mappings ([#171](https://github.com/CategoricalData/hydra/issues/171)).+- Simplified unit-valued variants in Python ([#206](https://github.com/CategoricalData/hydra/issues/206)).+- Checked for inconsistencies between Term/TTerm and Type/TType DSLs ([#218](https://github.com/CategoricalData/hydra/issues/218)).+- GenPG demo: refactored to support Haskell, Python, and Java; Python runner;+ Java generation; finalized output format.+- Testing: extended test runners for let hoisting (Haskell, Python, Java);+ floating-point precision tests; ordering tests for `hydra.lib.maps`/`hydra.lib.sets`;+ inference tests for inferred System F terms; case-hoisting test cases; new JSON coder tests;+ thorough test cases for all primitives ([#199](https://github.com/CategoricalData/hydra/issues/199)).++### Bug fixes++- Fixed interpreter bugs causing test failures ([#235](https://github.com/CategoricalData/hydra/issues/235)).+- Fixed bug in type checking in connection with dead code.+- Fixed bug in `removeTypesFromTerm`.+- Fixed bug in `typeOfMap`.+- Fixed 32-bit max int value in `hydra.constants`.+- Fixed numeric precision in Python.+- Added `BigDecimal` support and fixed `uint8` (short) support in Java.+- Fixed Haskell coder with respect to imports for binary literals.+- Excluded `Prelude.encodeFloat` and `Prelude.decodeFloat` from generated Haskell+ due to name collisions.+- Fixed consistency issues in Python primitives:+ `hydra.lib.sets.toList`, `hydra.lib.maps.union` (precedence),+ `hydra.lib.strings.lines`, `hydra.lib.strings.readString` (dequoting),+ `hydra.lib.lists.apply`, `hydra.lib.maps.toList`.+- Fixed Haskell type signature of `hydra.lists.span`.+- Fixed issue with eta expansion of typed terms.+- Fixed shadowing issue in generated encoding modules.+- Added missing alternatives in `hydra.rewriting.rewriteTermM`.++### Documentation++- Updated main README with complete implementation status.+- Added Documentation sections to all implementation READMEs.+- Fixed outdated Code-organization.md (Python now uses `src/gen-main`).+- Fixed incorrect code paths in Implementation.md.+- Added Java section to Testing wiki.+- Comprehensive developer recipes in `docs/recipes/`.+- Documentation for tail-call optimization implementation.+- Added Haddock comments to Haskell primitives.+- Created wiki page on the release process ([#194](https://github.com/CategoricalData/hydra/issues/194)).++### Community++- Accepted babeloff's `isTrivialTerm` changes.++---++## [0.12.0] - 2025-08-28++A consolidation release: significant Python progress, kernel-level cleanup,+and a wave of bookkeeping closures for Hydra-Java module ports.++### Breaking changes++- Removed `hydra.decoding` module ([#190](https://github.com/CategoricalData/hydra/issues/190)).+- Flattened dependency tiers; eliminated tier-1, tier-2, tier-3 organization ([#184](https://github.com/CategoricalData/hydra/issues/184)).+- Removed `typed` term variant ([#173](https://github.com/CategoricalData/hydra/issues/173), [#162](https://github.com/CategoricalData/hydra/issues/162)).+- Module naming changes: moved tabular and relational modules into kernel ([#152](https://github.com/CategoricalData/hydra/issues/152)).+- Standardized on uncurried helper functions in term-level DSLs ([#174](https://github.com/CategoricalData/hydra/issues/174)).+- Renamed `hydra.lib.flows.traverseOptional` to `hydra.lib.flows.mapOptional`.+- Eliminated camel-cased namespace parts from the kernel ([#152](https://github.com/CategoricalData/hydra/issues/152)).+- Replaced list and optional eliminations with primitive functions ([#150](https://github.com/CategoricalData/hydra/issues/150)).+- Moved `Hydra.Ext` to hydra-ext ([#178](https://github.com/CategoricalData/hydra/issues/178)); moved 'ext' sources into hydra-ext ([#189](https://github.com/CategoricalData/hydra/issues/189)).++### New features++- Significant progress toward Hydra-Python completion:+ generated all kernel types and terms into Python;+ added `Decimal` support for bigfloat values;+ environment tracking for variable scoping;+ generated `hydra.languages` into Python;+ `__hash__` and `__eq__` on serializable generated classes ([#160](https://github.com/CategoricalData/hydra/issues/160)).+- Designated `unit` term and type variants ([#186](https://github.com/CategoricalData/hydra/issues/186)).+- `hydra.lib.flows.mapElems` and `hydra.lib.flows.mapKeys` utilities.+- Promoted JSON coder into the DSL ([#181](https://github.com/CategoricalData/hydra/issues/181)).+- Promoted JSON utilities into the DSL ([#181](https://github.com/CategoricalData/hydra/issues/181)).+- C# coder ([#139](https://github.com/CategoricalData/hydra/issues/139)).+- GQL model and parser ([#140](https://github.com/CategoricalData/hydra/issues/140)).+- Tabular adapters ([#142](https://github.com/CategoricalData/hydra/issues/142)).+- Type-level C++ coder ([#170](https://github.com/CategoricalData/hydra/issues/170)).+- Variable-types-to-Haskell-typedefs transformation ([#70](https://github.com/CategoricalData/hydra/issues/70)).+- A newline at the end of each generated file ([#154](https://github.com/CategoricalData/hydra/issues/154)).+- Refactor kernel modules and primitives by connectivity ([#177](https://github.com/CategoricalData/hydra/issues/177)).++### Improvements++- Condensed repeated elements in error traces ([#165](https://github.com/CategoricalData/hydra/issues/165)).+- Fixed transitive schema dependencies ([#185](https://github.com/CategoricalData/hydra/issues/185)).+- Improved adapter solution with respect to literals.+- Better handling of type variables in Python coder.+- Enhanced term-level Python generation with proper ordering to minimize forward references.+- Topo-sort helper function for dependency management.+- Updated all Python libraries with latest changes.+- Distinguished between deannotation and detyping of terms.+- Adapted primitives when applying language constraints to a graph.+- Use unqualified names where possible in generated code ([#153](https://github.com/CategoricalData/hydra/issues/153)).+- Eliminated `Data.Graph` (containers) dependency ([#167](https://github.com/CategoricalData/hydra/issues/167)).+- "Close the loop" demonstration ([#175](https://github.com/CategoricalData/hydra/issues/175)).+- Implemented `typeOf` ([#168](https://github.com/CategoricalData/hydra/issues/168)).++### Bug fixes++- Fixed System F terms for records and case statements ([#168](https://github.com/CategoricalData/hydra/issues/168)).+- Fixed issue with transitive type-level module dependencies ([#185](https://github.com/CategoricalData/hydra/issues/185)).+- Corrected handling of variable references in Python application terms.+- Fixed nullary functions in Python (added empty parens).+- Added missing alternatives in `hydra.rewriting.rewriteTermM`.++### Bookkeeping++- Closed long-standing Hydra-Java module-port issues+ ([#9](https://github.com/CategoricalData/hydra/issues/9), [#11](https://github.com/CategoricalData/hydra/issues/11), [#15](https://github.com/CategoricalData/hydra/issues/15), [#16](https://github.com/CategoricalData/hydra/issues/16), [#18](https://github.com/CategoricalData/hydra/issues/18), [#19](https://github.com/CategoricalData/hydra/issues/19), [#20](https://github.com/CategoricalData/hydra/issues/20), [#21](https://github.com/CategoricalData/hydra/issues/21), [#22](https://github.com/CategoricalData/hydra/issues/22), [#23](https://github.com/CategoricalData/hydra/issues/23), [#25](https://github.com/CategoricalData/hydra/issues/25), [#44](https://github.com/CategoricalData/hydra/issues/44), [#45](https://github.com/CategoricalData/hydra/issues/45));+ most of the underlying work shipped in earlier releases.+- Closed Hydra-Java DSL-port issues ([#24](https://github.com/CategoricalData/hydra/issues/24), [#26](https://github.com/CategoricalData/hydra/issues/26), [#27](https://github.com/CategoricalData/hydra/issues/27), [#28](https://github.com/CategoricalData/hydra/issues/28), [#29](https://github.com/CategoricalData/hydra/issues/29)) and+ the Scala/Avro tracking issues ([#77](https://github.com/CategoricalData/hydra/issues/77), [#81](https://github.com/CategoricalData/hydra/issues/81)); these had been resolved+ by earlier releases (Scala in 0.14.0, Avro bidi in 0.14.0).++### Documentation++- Updated Hydra-Haskell README.+- Updated Hydra-Java README with corrected links.+- Updated JavaDocs.++---++## [0.11.0] - 2025-03-16++Untagged in-repository version.+A type-inference rebase release: major restructuring of inference internals+to align with Algorithm W, plus a sweeping removal of explicit type annotations+across the kernel.++### Highlights++- **Inference rebased on Algorithm W** ([#118](https://github.com/CategoricalData/hydra/issues/118)): unify-early strategy ([#146](https://github.com/CategoricalData/hydra/issues/146)),+ infinite-type checks restored ([#116](https://github.com/CategoricalData/hydra/issues/116)), recursive-element inference ([#90](https://github.com/CategoricalData/hydra/issues/90)),+ unified handling of elements and let bindings ([#112](https://github.com/CategoricalData/hydra/issues/112)), minimized manual+ type annotations ([#119](https://github.com/CategoricalData/hydra/issues/119)).+- **`hydra.inference` module** introduced for inference type definitions;+ substitution and unification moved up a level.++### Breaking changes++- Argument order of `Logic.ifElse` changed ([#147](https://github.com/CategoricalData/hydra/issues/147)).++### New features++- Inference test cases promoted into the common test suite ([#148](https://github.com/CategoricalData/hydra/issues/148));+ added "kernel examples" inference tests; more recursion / mutual recursion cases.++### Improvements++- Removed type annotations across all kernel sources ([#119](https://github.com/CategoricalData/hydra/issues/119)).+- Migrated to fully-applied primitive library DSLs ([#157](https://github.com/CategoricalData/hydra/issues/157)).+- Aligned `Graph` and `Element` with `LetBinding` ([#159](https://github.com/CategoricalData/hydra/issues/159)).+- `hydra.core.Unit` recognized by the Haskell coder.+- Refactored inference tests.++### Bug fixes++- Fix for underdetermined type in `hydra.decode`.++---++## [0.10.0] - 2025-02-19++Untagged in-repository version.+Adds Hydra-Python (initial completion), a GraphSON coder,+provisional Hydra-Go support, and dot-separated namespace conventions.++### Highlights++- **Hydra-Python initial completion** ([#80](https://github.com/CategoricalData/hydra/issues/80), [#66](https://github.com/CategoricalData/hydra/issues/66)): Python coder, generated kernel+ modules in Python, and full library implementations across kernel namespaces.+- **GraphSON coder** ([#79](https://github.com/CategoricalData/hydra/issues/79)).+- **Provisional Hydra-Go** ([#65](https://github.com/CategoricalData/hydra/issues/65)).+- **Namespace formatting** standardized to dot-separated form ([#151](https://github.com/CategoricalData/hydra/issues/151)).++### Breaking changes++- All namespaces use dot-separated form ([#151](https://github.com/CategoricalData/hydra/issues/151)).++### New features++- Hydra-Python: Python coder; generated `hydra.coreEncoding`, `hydra.strip`,+ `hydra.literals` and other kernel modules in Python; tuple-expression support;+ updated `hydra.constants` in Python.+- GraphSON coder ([#79](https://github.com/CategoricalData/hydra/issues/79)).+- Provisional Hydra-Go ([#65](https://github.com/CategoricalData/hydra/issues/65)).+- `string-to-char-list` and `char-list-to-string` primitives ([#149](https://github.com/CategoricalData/hydra/issues/149)).+- Restored normalization for generated term variables ([#145](https://github.com/CategoricalData/hydra/issues/145)).++### Improvements++- Re-leveled dependency tiers ([#135](https://github.com/CategoricalData/hydra/issues/135)).+- Updated all Java, Haskell, hydra-ext, and Python primitives to current sources.++---++## [0.9.0] - 2025-01-06++Untagged in-repository version.+Bootstraps Hydra-Python and the JSON Schema coder; introduces a fluent Java DSL for flows.++### Highlights++- **JSON Schema coder** ([#141](https://github.com/CategoricalData/hydra/issues/141)).+- **Python coder scaffold**: serde, language constraints, and generated Haskell+ sources for Python.+- **Fluent-style Java DSL for flows** ([#143](https://github.com/CategoricalData/hydra/issues/143)).++### New features++- JSON Schema coder ([#141](https://github.com/CategoricalData/hydra/issues/141)).+- Python coder scaffold and serde.+- Provisional Python language constraints module.+- Fluent-style Java DSL for flows ([#143](https://github.com/CategoricalData/hydra/issues/143)); moved Flows DSL into `hydra.dsl`.+- New `hydra.coders` DSL.+- New DSL functions for core variants.++### Improvements++- Generalized `Namespaces` so it can be used for languages other than Haskell.+- Local-name-only Python type aliases (the directory tree provides the namespace).+- Coders DSL used to simplify Java language-constraint sources.+- Removed redundant productions in the Python grammar.+- Added unit tests for fluent flows.++### Documentation++- Updated JavaDocs for 0.9.0.++---++## [0.8.1] - 2024-09-24++Patch release.++### Improvements++- Generalized the property graph merging utility to accept type systems other than Hydra Core.++---++## [0.8.0] - 2024-09-09++C# support ([#139](https://github.com/CategoricalData/hydra/issues/139)), Graphviz DOT coder, term accessors, and a small breaking change in Java+to support Spark.++### Breaking changes++- Made `FlowException` serializable for Spark support (may affect existing error handling).++### New features++- C# syntax module based on the Microsoft ANTLR grammar ([#139](https://github.com/CategoricalData/hydra/issues/139)).+- Graphviz DOT coder ([#136](https://github.com/CategoricalData/hydra/issues/136)):+ full support for lambdas and recursive `let` statements;+ compact 'accessor graph' visualization option;+ customizable label styles;+ highlighted let-bound terms; edge labels.+- Term accessor type to facilitate lenses and path-aware transformations.+- OpenGQL grammar and generated Haskell for the OpenGQL model ([#140](https://github.com/CategoricalData/hydra/issues/140)).++### Improvements++- Added `</>` as alternative to `@@` application operator in Haskell DSLs.+- Utilities for working with term accessors.+- More specific exception class for JSON decoding.+- Additional convenience methods on `JsonDecoding.java`.+- Used transitive dependencies in hydra-java and hydra-ext.+- Upgraded ANTLR to address a vulnerability.+- Moved TinkerPop utilities from `hydra/ext/org/apache/tinkerpop` into `hydra/pg`.++---++## [0.7.0] - 2024-08-21++Major refactoring of module organization and namespace management.+Establishes the DNS-style namespace convention in hydra-ext+and lifts property-graph models into a top-level `hydra/pg` namespace.++### Breaking changes++- Namespace reorganization: migrated to DNS-based module naming in hydra-ext ([#138](https://github.com/CategoricalData/hydra/issues/138)):+ `hydra/ext/avro` → `hydra/ext/org/apache/avro`,+ `hydra/ext/graphql` → `hydra/ext/org/graphql`,+ `hydra/ext/yaml` → `hydra/ext/org/yaml`,+ `hydra/ext/json/decoding` → `hydra/ext/org/json/decoding`,+ `hydra/ext/rdf` → `hydra/ext/org/w3/rdf`,+ `hydra/ext/shacl` → `hydra/ext/org/w3/shacl`,+ `hydra/ext/tinkerpop` → `hydra/ext/org/apache/tinkerpop`.+- Property graphs: promoted property graph modules from+ `hydra/ext/org/apache/tinkerpop` to `hydra/pg`.+- Project structure: renamed `hydra-extensions` to `hydra-ext`;+ renamed `hydra/langs` to `hydra/ext` ([#138](https://github.com/CategoricalData/hydra/issues/138));+ made hydra-ext into a Gradle subproject alongside hydra-java;+ added top-level Gradle build.++### Improvements++- Moved TinkerPop modules from hydra-haskell into hydra-ext for better separation.+- Moved miscellaneous models to `Hydra.Ext.Other` ([#138](https://github.com/CategoricalData/hydra/issues/138)).+- Moved XML Schema, SQL, ShEx, and OWL models to hydra-ext.+- Moved KQL, Parquet, and Python modules to hydra-ext.+- Separated JavaDocs for hydra-java and hydra-ext.+- Updated publishing configuration in `build.gradle`.++---++## [0.6.0] - 2024-08-19++Type-system improvements (System F type abstraction/application; eliminated polymorphic+types from Hydra Core), expanded language support (Graphviz DOT model, generated Java+field-name constants), and revamped annotation handling.++### Breaking changes++- Eliminated `InferenceContext` helper type ([#103](https://github.com/CategoricalData/hydra/issues/103)).+- Changed typing environment from `Map Name Type` to `Map Name TypeScheme` in graphs ([#76](https://github.com/CategoricalData/hydra/issues/76)).+- Updated annotations and flows to use `map<Name, Term>` instead of `map<string, Term>` ([#133](https://github.com/CategoricalData/hydra/issues/133)).+- Unified `Name` and `FieldName`; aliased to `string` ([#121](https://github.com/CategoricalData/hydra/issues/121)).+- Renamed `hydra/core.UnitType` to `hydra/core.Unit` ([#123](https://github.com/CategoricalData/hydra/issues/123)).+- Eliminated annotation classes; Hydra has a single built-in notion of annotations ([#113](https://github.com/CategoricalData/hydra/issues/113)).+- Unified the `Nominal` type with `RowType` ([#115](https://github.com/CategoricalData/hydra/issues/115)).+- Removed the `extends` parameter for row types ([#132](https://github.com/CategoricalData/hydra/issues/132)).+- Replaced `hydra/Kv` with `hydra/Annotations` (rename revisited).++### New features++- System F support: `typeAbstraction` and `typeApplication` term constructors.+- Python3 syntax model based on the official Python BNF ([#80](https://github.com/CategoricalData/hydra/issues/80)).+- Graphviz DOT model and initial support ([#136](https://github.com/CategoricalData/hydra/issues/136)).+- Field-name constants generated in Java code generation ([#137](https://github.com/CategoricalData/hydra/issues/137)).+- Provisional Algorithm W implementation in Haskell (originally from @wisnesky), kept for reference.++### Improvements++- Primitive organization: Hydra primitives organized into libraries for namespace management.+- Code generation:+ - Escaped field name constants and `with_` methods in Java coder.+ - Generated field name constants in Java ([#137](https://github.com/CategoricalData/hydra/issues/137)).+ - Avoided duplicated comments in wrapper classes in generated Java.+ - Removed superfluous newtype comments in Haskell coder.+- Updated Delta Parquet model to follow the Java API more closely.+- Enriched OpenCypher features module with the complete list of standard Cypher functions.+- Added convenience methods to `JsonEncoding.java`.+- Restored `Hydra.Inference` subdirectory.+- Allowed arbitrary case for element names ([#7](https://github.com/CategoricalData/hydra/issues/7)).+- Corrected `uint8` representation in Java to `Short` ([#120](https://github.com/CategoricalData/hydra/issues/120)).++### Bug fixes++- Fixed handling of type annotations in term adapters.+- Fixed decoding of encoded terms annotated with a type.+- Corrected encoding of universal types in `showTerm` ([#117](https://github.com/CategoricalData/hydra/issues/117)).++---++## [0.5.3] - 2024-08-06++Patch release.+Preserves order of map key/value pairs and set elements during JSON serialization.++### Bug fixes++- Preserved ordering of key/value pairs and set elements in JSON output.++### New features++- Polymorphic `equal` primitive in Haskell and Java.+- Generated Hydra type definitions together with native instantiations of Hydra types+ in Haskell (a stepping stone toward generated coders, [#47](https://github.com/CategoricalData/hydra/issues/47)).++---++## [0.5.1] - 2024-08-01++Patch release.+Dependency updates and minor improvements following the 0.5.0 Hydra Core overhaul.++### Improvements++- Updated dependencies.++---++## [0.5.0] - 2024-07-26++Untagged in-repository version.+Major Hydra Core overhaul: eliminates polymorphic types in favor of explicit+TypeScheme; consolidates the annotation system; revamps `Let` term encoding.++### Breaking changes++- Eliminated polymorphic types from Hydra Core in Haskell ([#125](https://github.com/CategoricalData/hydra/issues/125)):+ removed type parameters from `hydra/core` types in Hydra-Java; replaced type schemes+ with forall types ([#76](https://github.com/CategoricalData/hydra/issues/76)).+- Revamped core encoding and `Let`: bindings are now a list of+ `(name, term, optional type scheme)` triplets instead of a map.+- Unified typed-term types and moved `TypeScheme` into Hydra Core.+- Eliminated `AnnotationClass`; Hydra has a single built-in notion of annotations now ([#113](https://github.com/CategoricalData/hydra/issues/113)).+- Renamed and refactored phantom-type wrappers ([#128](https://github.com/CategoricalData/hydra/issues/128)); removed deprecated `Reference`+ type from `hydra/phantoms`.+- Removed incomplete support for stream types and stream terms ([#88](https://github.com/CategoricalData/hydra/issues/88)).++### New features++- `LiteralTypes` DSL module so literals can be built independently of terms.+- `Hydra.Minimal` module to facilitate collaboration on Hydra application prototypes.+- `TypeConstraint` type added to the kernel.+- `foldl` primitive in Haskell and Java; DSL uses `foldl` instead of the built-in+ list elimination term by default.++### Improvements++- Improvements to Java and JSON coders; improved untyped JSON coder.+- Pre-order and post-order term-traversal test cases added.+- Refactored type inference tests.+- Restored generated Java (Core through Tier 3) with only a few manual tweaks.+- Element names allow arbitrary case ([#7](https://github.com/CategoricalData/hydra/issues/7)).++---++## [0.4.0] - 2024-07-10++Untagged in-repository version.+Adds null checks to generated Java (breaking, but justified — Hydra-Java disallows nulls),+the Gremlin model, and Protobuf annotation refinements.++### Breaking changes++- Null checks added to constructors and `withXXX()` methods in generated Java;+ null values are no longer permitted in Hydra-Java.+- Removed Java 8 restriction (raised minimum Java version).++### New features++- Gremlin model ([#127](https://github.com/CategoricalData/hydra/issues/127)); generated Haskell for Gremlin.+- `hydra/lib/lists.safeHead` primitive in Haskell (necessary in Java due to eager evaluation).+- Support for Protobuf `deprecated=true` annotation; non-string Protobuf options.+- Java options in generated Protobuf.++### Improvements++- Used `java.util.Objects.requireNonNull` instead of a custom null check in generated Java.+- Added 'automatically generated file' disclaimer to generated Java files.+- Added autogen comments and null checks to (most) generated Java.+- Added necessary schema-level dependencies for built-in modules.+- Added null checks to the Flows DSL in Java.++---++## [0.3.0] - 2024-06-05++Untagged in-repository version.+Adds an OpenCypher parser based on an ANTLR grammar ([#124](https://github.com/CategoricalData/hydra/issues/124)),+a KQL (Kusto Query Language) model and serializer,+a Delta Parquet model,+and an early property graph queries model in the style of Cypher.++### New features++- OpenCypher parser based on the OpenCypher M23 ANTLR grammar ([#124](https://github.com/CategoricalData/hydra/issues/124));+ ANTLR added as a build dependency;+ large Cypher test suite drawn from the Cypher Manual.+- Cypher-to-PG-query transformer (Java; partially implemented).+- Property graph queries DSL and generated property graph query classes in Java.+- Property graph queries model (Cypher / future GQL style).+- KQL (Kusto Query Language) initial model and basic serializer.+- Delta Parquet model with generated sources.++### Improvements++- Java options and `deprecated=true` support in generated Protobuf.+- Convenience methods in Java.++---++## [0.2.0] - 2024-01-10++Hydra-Java 0.2.0 release.+Significant Java tooling and DSL build-out, Protobuf bidirectional coder,+Python3 syntax model ([#80](https://github.com/CategoricalData/hydra/issues/80)), property graph validation ([#100](https://github.com/CategoricalData/hydra/issues/100)),+JSON bidirectional support in Java ([#104](https://github.com/CategoricalData/hydra/issues/104)),+OpenCypher initial model ([#108](https://github.com/CategoricalData/hydra/issues/108)),+Cypher unification, and the start of the typed-DSL story in Haskell.++### New features++- Property graph validation: validator type, optionality on property types,+ customizable id/property handling in the merging adapter, fine-tuned validation,+ comprehensive unit tests in Java ([#100](https://github.com/CategoricalData/hydra/issues/100)).+- Bidirectional JSON serialization/deserialization in Java ([#104](https://github.com/CategoricalData/hydra/issues/104)).+- Checkstyle configuration based on Google style guide ([#111](https://github.com/CategoricalData/hydra/issues/111)).+- Python3 syntax model based on the official Python BNF ([#80](https://github.com/CategoricalData/hydra/issues/80)).+- Initial OpenCypher model and parser scaffold ([#108](https://github.com/CategoricalData/hydra/issues/108)).+- Protobuf coder ([#99](https://github.com/CategoricalData/hydra/issues/99)): type encoder, field numbering, formatting, deprecated annotation,+ Java options, non-string options.+- Adapter framework tolerance of recursive types ([#58](https://github.com/CategoricalData/hydra/issues/58)); default branch for case+ statements ([#60](https://github.com/CategoricalData/hydra/issues/60)).+- Topological sort in type inference ([#67](https://github.com/CategoricalData/hydra/issues/67)).+- `hydra/query` model ([#73](https://github.com/CategoricalData/hydra/issues/73)).+- Records-to-TinkerPop-elements coder ([#64](https://github.com/CategoricalData/hydra/issues/64)).+- Equality primitives for all literal types ([#92](https://github.com/CategoricalData/hydra/issues/92)); polymorphic logic primitives ([#95](https://github.com/CategoricalData/hydra/issues/95)).+- `mapKeys` primitive ([#93](https://github.com/CategoricalData/hydra/issues/93)).+- Tuple support in Java ([#94](https://github.com/CategoricalData/hydra/issues/94)).+- Java 8 as an optional target ([#96](https://github.com/CategoricalData/hydra/issues/96)); optionally generate Java classes as `Serializable` ([#97](https://github.com/CategoricalData/hydra/issues/97)).+- Bidirectional "merged vertex" and "merged edge" coders ([#106](https://github.com/CategoricalData/hydra/issues/106)).+- Nullability and parameterization in the tabular model ([#107](https://github.com/CategoricalData/hydra/issues/107)).+- Term-level / type-level dependency distinction for modules ([#109](https://github.com/CategoricalData/hydra/issues/109)).+- Flatten nested `let` terms for transformation into Java ([#110](https://github.com/CategoricalData/hydra/issues/110)).+- Various `Flow` utilities in Java: `bind3`; convenience methods for consuming results;+ `fromFlow` variants including one that throws.++### Improvements++- Hydra-Java module ports ([#10](https://github.com/CategoricalData/hydra/issues/10), [#12](https://github.com/CategoricalData/hydra/issues/12), [#13](https://github.com/CategoricalData/hydra/issues/13), [#14](https://github.com/CategoricalData/hydra/issues/14), [#17](https://github.com/CategoricalData/hydra/issues/17), [#30](https://github.com/CategoricalData/hydra/issues/30), [#31](https://github.com/CategoricalData/hydra/issues/31), [#32](https://github.com/CategoricalData/hydra/issues/32), [#33](https://github.com/CategoricalData/hydra/issues/33), [#34](https://github.com/CategoricalData/hydra/issues/34), [#35](https://github.com/CategoricalData/hydra/issues/35),+ [#38](https://github.com/CategoricalData/hydra/issues/38), [#39](https://github.com/CategoricalData/hydra/issues/39), [#41](https://github.com/CategoricalData/hydra/issues/41), [#43](https://github.com/CategoricalData/hydra/issues/43), [#48](https://github.com/CategoricalData/hydra/issues/48), [#71](https://github.com/CategoricalData/hydra/issues/71), [#72](https://github.com/CategoricalData/hydra/issues/72), [#75](https://github.com/CategoricalData/hydra/issues/75), [#83](https://github.com/CategoricalData/hydra/issues/83)):+ `Common`, `CoreEncoding`, `CoreLanguage`, `Kernel`, `Flows`, `Lists`, `Literals`,+ `Math`, `Sets`, `Strings`, `Optionals`, `Maps`, `Flows` primitives, `Sets` primitives.+- Common DSLs in Haskell: Flow support ([#68](https://github.com/CategoricalData/hydra/issues/68)), Let support ([#69](https://github.com/CategoricalData/hydra/issues/69)).+- Renamed annotation type parameter `m` to `a` ([#41](https://github.com/CategoricalData/hydra/issues/41)).+- Updated wrapper, element, and variable types ([#75](https://github.com/CategoricalData/hydra/issues/75)).+- Removed `schema` field from `Element` ([#83](https://github.com/CategoricalData/hydra/issues/83)).+- GraphQL coder ([#78](https://github.com/CategoricalData/hydra/issues/78)).+- Code quality:+ - Updated main and test sources to conform to Checkstyle configuration ([#111](https://github.com/CategoricalData/hydra/issues/111)).+ - Extended line-length limit from 100 to 120 characters.+ - Disabled overly restrictive indentation and import-order rules.+ - Disabled `RightCurlyAlone` for compact inline map definitions.+- Streamlined property-graph element merging to unify properties with identical+ keys and types ([#106](https://github.com/CategoricalData/hydra/issues/106)).+- Convenience functions for printing literals and literal types in the Java DSL.+- Minor addition to JSON decoding.+- DSL convenience: alphabetic-case flexibility for element names ([#7](https://github.com/CategoricalData/hydra/issues/7)).++### Bug fixes++- Fixed type annotations for the Sets Java port ([#48](https://github.com/CategoricalData/hydra/issues/48)).+- Various minor fixes during the Java module ports.++---++## [0.1.1] - 2022-12-04++Patch release the same day as 0.1.0.+README polish only.++---++## [0.1.0] - 2022-12-04++First packaged release of Hydra (Hackage).+This release contains the complete foundation of Hydra.++### Core language++- Hydra's core type and data languages (`hydra.core`).+- Core models for graphs and modules.+- Computation model with the `Flow` monad.+- BNF grammars support.+- Phantom types.+- Basic operations on types and terms.++### Type system++- Hindley–Milner-style type inference.+- Type schemes with polymorphism.+- Type/term validation.++### Transformations++- Adapter system: type-to-type rewriting and transformation.+- Coders:+ Haskell coder (types and terms),+ Java coder (types and terms),+ partial Scala coder (terms only),+ Avro coder,+ JSON coder,+ PDL (Pegasus Data Language) coder,+ RDF + SHACL coder,+ YAML coder.++### Language support++- Models for GraphQL, OWL (Web Ontology Language), ShEx (Shape Expressions),+ and TinkerPop-style property graphs.++### Developer tools++- Type-construction DSL and term-construction DSL.+- QuickCheck property-based tests.++### Implementations++- Hydra-Haskell: bootstrapping implementation with full kernel.+- Hydra-Java: Java implementation with mature tooling.++### Community++- Set up the LambdaGraph Discord server ([#2](https://github.com/CategoricalData/hydra/issues/2)).++---++## Contributing++We welcome contributions! Please see:++- [Developer recipes](https://github.com/CategoricalData/hydra/tree/main/docs/recipes)+- [LambdaGraph Discord](https://bit.ly/lg-discord)++## Release process++See the [Release policy](https://github.com/CategoricalData/hydra/wiki/Release-policy)+wiki page and [docs/release-workflow.md](docs/release-workflow.md)+for information on how Hydra releases are versioned, built, and published.
+ LICENSE view
@@ -0,0 +1,201 @@+ Apache License+ Version 2.0, January 2004+ http://www.apache.org/licenses/++ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION++ 1. Definitions.++ "License" shall mean the terms and conditions for use, reproduction,+ and distribution as defined by Sections 1 through 9 of this document.++ "Licensor" shall mean the copyright owner or entity authorized by+ the copyright owner that is granting the License.++ "Legal Entity" shall mean the union of the acting entity and all+ other entities that control, are controlled by, or are under common+ control with that entity. For the purposes of this definition,+ "control" means (i) the power, direct or indirect, to cause the+ direction or management of such entity, whether by contract or+ otherwise, or (ii) ownership of fifty percent (50%) or more of the+ outstanding shares, or (iii) beneficial ownership of such entity.++ "You" (or "Your") shall mean an individual or Legal Entity+ exercising permissions granted by this License.++ "Source" form shall mean the preferred form for making modifications,+ including but not limited to software source code, documentation+ source, and configuration files.++ "Object" form shall mean any form resulting from mechanical+ transformation or translation of a Source form, including but+ not limited to compiled object code, generated documentation,+ and conversions to other media types.++ "Work" shall mean the work of authorship, whether in Source or+ Object form, made available under the License, as indicated by a+ copyright notice that is included in or attached to the work+ (an example is provided in the Appendix below).++ "Derivative Works" shall mean any work, whether in Source or Object+ form, that is based on (or derived from) the Work and for which the+ editorial revisions, annotations, elaborations, or other modifications+ represent, as a whole, an original work of authorship. For the purposes+ of this License, Derivative Works shall not include works that remain+ separable from, or merely link (or bind by name) to the interfaces of,+ the Work and Derivative Works thereof.++ "Contribution" shall mean any work of authorship, including+ the original version of the Work and any modifications or additions+ to that Work or Derivative Works thereof, that is intentionally+ submitted to Licensor for inclusion in the Work by the copyright owner+ or by an individual or Legal Entity authorized to submit on behalf of+ the copyright owner. For the purposes of this definition, "submitted"+ means any form of electronic, verbal, or written communication sent+ to the Licensor or its representatives, including but not limited to+ communication on electronic mailing lists, source code control systems,+ and issue tracking systems that are managed by, or on behalf of, the+ Licensor for the purpose of discussing and improving the Work, but+ excluding communication that is conspicuously marked or otherwise+ designated in writing by the copyright owner as "Not a Contribution."++ "Contributor" shall mean Licensor and any individual or Legal Entity+ on behalf of whom a Contribution has been received by Licensor and+ subsequently incorporated within the Work.++ 2. Grant of Copyright License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ copyright license to reproduce, prepare Derivative Works of,+ publicly display, publicly perform, sublicense, and distribute the+ Work and such Derivative Works in Source or Object form.++ 3. Grant of Patent License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ (except as stated in this section) patent license to make, have made,+ use, offer to sell, sell, import, and otherwise transfer the Work,+ where such license applies only to those patent claims licensable+ by such Contributor that are necessarily infringed by their+ Contribution(s) alone or by combination of their Contribution(s)+ with the Work to which such Contribution(s) was submitted. If You+ institute patent litigation against any entity (including a+ cross-claim or counterclaim in a lawsuit) alleging that the Work+ or a Contribution incorporated within the Work constitutes direct+ or contributory patent infringement, then any patent licenses+ granted to You under this License for that Work shall terminate+ as of the date such litigation is filed.++ 4. Redistribution. You may reproduce and distribute copies of the+ Work or Derivative Works thereof in any medium, with or without+ modifications, and in Source or Object form, provided that You+ meet the following conditions:++ (a) You must give any other recipients of the Work or+ Derivative Works a copy of this License; and++ (b) You must cause any modified files to carry prominent notices+ stating that You changed the files; and++ (c) You must retain, in the Source form of any Derivative Works+ that You distribute, all copyright, patent, trademark, and+ attribution notices from the Source form of the Work,+ excluding those notices that do not pertain to any part of+ the Derivative Works; and++ (d) If the Work includes a "NOTICE" text file as part of its+ distribution, then any Derivative Works that You distribute must+ include a readable copy of the attribution notices contained+ within such NOTICE file, excluding those notices that do not+ pertain to any part of the Derivative Works, in at least one+ of the following places: within a NOTICE text file distributed+ as part of the Derivative Works; within the Source form or+ documentation, if provided along with the Derivative Works; or,+ within a display generated by the Derivative Works, if and+ wherever such third-party notices normally appear. The contents+ of the NOTICE file are for informational purposes only and+ do not modify the License. You may add Your own attribution+ notices within Derivative Works that You distribute, alongside+ or as an addendum to the NOTICE text from the Work, provided+ that such additional attribution notices cannot be construed+ as modifying the License.++ You may add Your own copyright statement to Your modifications and+ may provide additional or different license terms and conditions+ for use, reproduction, or distribution of Your modifications, or+ for any such Derivative Works as a whole, provided Your use,+ reproduction, and distribution of the Work otherwise complies with+ the conditions stated in this License.++ 5. Submission of Contributions. Unless You explicitly state otherwise,+ any Contribution intentionally submitted for inclusion in the Work+ by You to the Licensor shall be under the terms and conditions of+ this License, without any additional terms or conditions.+ Notwithstanding the above, nothing herein shall supersede or modify+ the terms of any separate license agreement you may have executed+ with Licensor regarding such Contributions.++ 6. Trademarks. This License does not grant permission to use the trade+ names, trademarks, service marks, or product names of the Licensor,+ except as required for reasonable and customary use in describing the+ origin of the Work and reproducing the content of the NOTICE file.++ 7. Disclaimer of Warranty. Unless required by applicable law or+ agreed to in writing, Licensor provides the Work (and each+ Contributor provides its Contributions) on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+ implied, including, without limitation, any warranties or conditions+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+ PARTICULAR PURPOSE. You are solely responsible for determining the+ appropriateness of using or redistributing the Work and assume any+ risks associated with Your exercise of permissions under this License.++ 8. Limitation of Liability. In no event and under no legal theory,+ whether in tort (including negligence), contract, or otherwise,+ unless required by applicable law (such as deliberate and grossly+ negligent acts) or agreed to in writing, shall any Contributor be+ liable to You for damages, including any direct, indirect, special,+ incidental, or consequential damages of any character arising as a+ result of this License or out of the use or inability to use the+ Work (including but not limited to damages for loss of goodwill,+ work stoppage, computer failure or malfunction, or any and all+ other commercial damages or losses), even if such Contributor+ has been advised of the possibility of such damages.++ 9. Accepting Warranty or Additional Liability. While redistributing+ the Work or Derivative Works thereof, You may choose to offer,+ and charge a fee for, acceptance of support, warranty, indemnity,+ or other liability obligations and/or rights consistent with this+ License. However, in accepting such obligations, You may act only+ on Your own behalf and on Your sole responsibility, not on behalf+ of any other Contributor, and only if You agree to indemnify,+ defend, and hold each Contributor harmless for any liability+ incurred by, or claims asserted against, such Contributor by reason+ of your accepting any such warranty or additional liability.++ END OF TERMS AND CONDITIONS++ APPENDIX: How to apply the Apache License to your work.++ To apply the Apache License to your work, attach the following+ boilerplate notice, with the fields enclosed by brackets "[]"+ replaced with your own identifying information. (Don't include+ the brackets!) The text should be enclosed in the appropriate+ comment syntax for the file format. We also recommend that a+ file or class name and description of purpose be included on the+ same "printed page" as the copyright notice for easier+ identification within third-party archives.++ Copyright [yyyy] [name of copyright owner]++ Licensed under the Apache License, Version 2.0 (the "License");+ you may not use this file except in compliance with the License.+ You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing, software+ distributed under the License is distributed on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ See the License for the specific language governing permissions and+ limitations under the License.
+ NOTICE view
@@ -0,0 +1,3 @@+Hydra+Copyright 2021-2026 The Hydra authors+https://github.com/CategoricalData/hydra
+ hydra-typescript.cabal view
@@ -0,0 +1,45 @@+cabal-version: 1.12++-- This file has been generated from package.yaml by hpack version 0.39.1.+--+-- see: https://github.com/sol/hpack++name: hydra-typescript+version: 0.17.0+synopsis: Hydra's TypeScript coder: emit TypeScript source from Hydra modules+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". TypeScript support for Hydra+category: Data+homepage: https://github.com/CategoricalData/hydra#readme+bug-reports: https://github.com/CategoricalData/hydra/issues+author: Joshua Shinavier <josh@fortytwo.net>+maintainer: Joshua Shinavier <josh@fortytwo.net>+license: Apache-2.0+license-file: LICENSE+build-type: Simple+extra-source-files:+ LICENSE+ NOTICE+ CHANGELOG.md++source-repository head+ type: git+ location: https://github.com/CategoricalData/hydra++library+ exposed-modules:+ Hydra.Dsl.TypeScript.Syntax+ Hydra.TypeScript.Coder+ Hydra.TypeScript.Language+ Hydra.TypeScript.Operators+ Hydra.TypeScript.Serde+ Hydra.TypeScript.Syntax+ other-modules:+ Paths_hydra_typescript+ hs-source-dirs:+ src/main/haskell+ build-depends:+ base >=4.19.0 && <4.22+ , containers >=0.6.7 && <0.8+ , hydra-kernel ==0.17.0+ , scientific >=0.3.7 && <0.4+ default-language: Haskell2010
+ src/main/haskell/Hydra/Dsl/TypeScript/Syntax.hs view
@@ -0,0 +1,6941 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.typeScript.syntax++module Hydra.Dsl.TypeScript.Syntax where++import qualified Hydra.Core as Core+import qualified Hydra.Dsl.Core as DslCore+import qualified Hydra.TypeScript.Syntax as Syntax+import qualified Hydra.Typed as Typed+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci+import qualified Data.Int as I++-- | DSL injection for the expression variant of hydra.typeScript.syntax.ArrayElement+arrayElementExpression :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ArrayElement+arrayElementExpression x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ArrayElement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "expression"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the hole variant of hydra.typeScript.syntax.ArrayElement+arrayElementHole :: Typed.TypedTerm Syntax.ArrayElement+arrayElementHole =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ArrayElement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "hole"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the spread variant of hydra.typeScript.syntax.ArrayElement+arrayElementSpread :: Typed.TypedTerm Syntax.SpreadElement -> Typed.TypedTerm Syntax.ArrayElement+arrayElementSpread x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ArrayElement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "spread"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for the hydra.typeScript.syntax.ArrayTypeExpression wrapper+arrayTypeExpression :: Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.ArrayTypeExpression+arrayTypeExpression x =+ Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {+ Core.wrappedTermTypeName = (Core.Name "hydra.typeScript.syntax.ArrayTypeExpression"),+ Core.wrappedTermBody = (Typed.unTypedTerm x)}))++-- | DSL injection for the block variant of hydra.typeScript.syntax.ArrowFunctionBody+arrowFunctionBodyBlock :: Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm Syntax.ArrowFunctionBody+arrowFunctionBodyBlock x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ArrowFunctionBody"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "block"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the expression variant of hydra.typeScript.syntax.ArrowFunctionBody+arrowFunctionBodyExpression :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ArrowFunctionBody+arrowFunctionBodyExpression x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ArrowFunctionBody"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "expression"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.ArrowFunctionExpression+arrowFunctionExpression :: Typed.TypedTerm [Syntax.Pattern] -> Typed.TypedTerm Syntax.ArrowFunctionBody -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.ArrowFunctionExpression+arrowFunctionExpression params body async =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ArrowFunctionExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "params"),+ Core.fieldTerm = (Typed.unTypedTerm params)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)},+ Core.Field {+ Core.fieldName = (Core.Name "async"),+ Core.fieldTerm = (Typed.unTypedTerm async)}]}))++-- | DSL accessor for the async field of hydra.typeScript.syntax.ArrowFunctionExpression+arrowFunctionExpressionAsync :: Typed.TypedTerm Syntax.ArrowFunctionExpression -> Typed.TypedTerm Bool+arrowFunctionExpressionAsync x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ArrowFunctionExpression"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.ArrowFunctionExpression+arrowFunctionExpressionBody :: Typed.TypedTerm Syntax.ArrowFunctionExpression -> Typed.TypedTerm Syntax.ArrowFunctionBody+arrowFunctionExpressionBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ArrowFunctionExpression"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the params field of hydra.typeScript.syntax.ArrowFunctionExpression+arrowFunctionExpressionParams :: Typed.TypedTerm Syntax.ArrowFunctionExpression -> Typed.TypedTerm [Syntax.Pattern]+arrowFunctionExpressionParams x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ArrowFunctionExpression"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the async field of hydra.typeScript.syntax.ArrowFunctionExpression+arrowFunctionExpressionWithAsync :: Typed.TypedTerm Syntax.ArrowFunctionExpression -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.ArrowFunctionExpression+arrowFunctionExpressionWithAsync original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ArrowFunctionExpression"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ArrowFunctionExpression"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "async"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the body field of hydra.typeScript.syntax.ArrowFunctionExpression+arrowFunctionExpressionWithBody :: Typed.TypedTerm Syntax.ArrowFunctionExpression -> Typed.TypedTerm Syntax.ArrowFunctionBody -> Typed.TypedTerm Syntax.ArrowFunctionExpression+arrowFunctionExpressionWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ArrowFunctionExpression"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ArrowFunctionExpression"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the params field of hydra.typeScript.syntax.ArrowFunctionExpression+arrowFunctionExpressionWithParams :: Typed.TypedTerm Syntax.ArrowFunctionExpression -> Typed.TypedTerm [Syntax.Pattern] -> Typed.TypedTerm Syntax.ArrowFunctionExpression+arrowFunctionExpressionWithParams original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ArrowFunctionExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "params"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ArrowFunctionExpression"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ArrowFunctionExpression"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.AsExpression+asExpression :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.AsExpression+asExpression expression type_ =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.AsExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "expression"),+ Core.fieldTerm = (Typed.unTypedTerm expression)},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm type_)}]}))++-- | DSL accessor for the expression field of hydra.typeScript.syntax.AsExpression+asExpressionExpression :: Typed.TypedTerm Syntax.AsExpression -> Typed.TypedTerm Syntax.Expression+asExpressionExpression x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.AsExpression"),+ Core.projectionFieldName = (Core.Name "expression")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the type field of hydra.typeScript.syntax.AsExpression+asExpressionType :: Typed.TypedTerm Syntax.AsExpression -> Typed.TypedTerm Syntax.TypeExpression+asExpressionType x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.AsExpression"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the expression field of hydra.typeScript.syntax.AsExpression+asExpressionWithExpression :: Typed.TypedTerm Syntax.AsExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.AsExpression+asExpressionWithExpression original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.AsExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "expression"),+ Core.fieldTerm = (Typed.unTypedTerm 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.syntax.AsExpression"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the type field of hydra.typeScript.syntax.AsExpression+asExpressionWithType :: Typed.TypedTerm Syntax.AsExpression -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.AsExpression+asExpressionWithType original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.AsExpression"),+ 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.typeScript.syntax.AsExpression"),+ Core.projectionFieldName = (Core.Name "expression")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.AssignmentExpression+assignmentExpression :: Typed.TypedTerm Syntax.AssignmentOperator -> Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.AssignmentExpression+assignmentExpression operator left right =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "operator"),+ Core.fieldTerm = (Typed.unTypedTerm operator)},+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm left)},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm right)}]}))++-- | DSL accessor for the left field of hydra.typeScript.syntax.AssignmentExpression+assignmentExpressionLeft :: Typed.TypedTerm Syntax.AssignmentExpression -> Typed.TypedTerm Syntax.Pattern+assignmentExpressionLeft x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentExpression"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the operator field of hydra.typeScript.syntax.AssignmentExpression+assignmentExpressionOperator :: Typed.TypedTerm Syntax.AssignmentExpression -> Typed.TypedTerm Syntax.AssignmentOperator+assignmentExpressionOperator x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentExpression"),+ Core.projectionFieldName = (Core.Name "operator")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the right field of hydra.typeScript.syntax.AssignmentExpression+assignmentExpressionRight :: Typed.TypedTerm Syntax.AssignmentExpression -> Typed.TypedTerm Syntax.Expression+assignmentExpressionRight x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentExpression"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the left field of hydra.typeScript.syntax.AssignmentExpression+assignmentExpressionWithLeft :: Typed.TypedTerm Syntax.AssignmentExpression -> Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm Syntax.AssignmentExpression+assignmentExpressionWithLeft original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.AssignmentExpression"),+ Core.projectionFieldName = (Core.Name "operator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.AssignmentExpression"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the operator field of hydra.typeScript.syntax.AssignmentExpression+assignmentExpressionWithOperator :: Typed.TypedTerm Syntax.AssignmentExpression -> Typed.TypedTerm Syntax.AssignmentOperator -> Typed.TypedTerm Syntax.AssignmentExpression+assignmentExpressionWithOperator original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "operator"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.AssignmentExpression"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.AssignmentExpression"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the right field of hydra.typeScript.syntax.AssignmentExpression+assignmentExpressionWithRight :: Typed.TypedTerm Syntax.AssignmentExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.AssignmentExpression+assignmentExpressionWithRight original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.AssignmentExpression"),+ Core.projectionFieldName = (Core.Name "operator")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.AssignmentExpression"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL injection for the addAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorAddAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorAddAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "addAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the andAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorAndAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorAndAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "andAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the assign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "assign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the bitwiseAndAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorBitwiseAndAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorBitwiseAndAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "bitwiseAndAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the bitwiseOrAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorBitwiseOrAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorBitwiseOrAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "bitwiseOrAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the bitwiseXorAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorBitwiseXorAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorBitwiseXorAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "bitwiseXorAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the divideAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorDivideAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorDivideAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "divideAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the exponentiateAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorExponentiateAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorExponentiateAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "exponentiateAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the leftShiftAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorLeftShiftAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorLeftShiftAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "leftShiftAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the moduloAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorModuloAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorModuloAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "moduloAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the multiplyAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorMultiplyAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorMultiplyAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "multiplyAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the nullishAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorNullishAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorNullishAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "nullishAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the orAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorOrAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorOrAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "orAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the rightShiftAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorRightShiftAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorRightShiftAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "rightShiftAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the subtractAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorSubtractAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorSubtractAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "subtractAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the unsignedRightShiftAssign variant of hydra.typeScript.syntax.AssignmentOperator+assignmentOperatorUnsignedRightShiftAssign :: Typed.TypedTerm Syntax.AssignmentOperator+assignmentOperatorUnsignedRightShiftAssign =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "unsignedRightShiftAssign"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL constructor for hydra.typeScript.syntax.AssignmentPattern+assignmentPattern :: Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.AssignmentPattern+assignmentPattern left right =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentPattern"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm left)},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm right)}]}))++-- | DSL accessor for the left field of hydra.typeScript.syntax.AssignmentPattern+assignmentPatternLeft :: Typed.TypedTerm Syntax.AssignmentPattern -> Typed.TypedTerm Syntax.Pattern+assignmentPatternLeft x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentPattern"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the right field of hydra.typeScript.syntax.AssignmentPattern+assignmentPatternRight :: Typed.TypedTerm Syntax.AssignmentPattern -> Typed.TypedTerm Syntax.Expression+assignmentPatternRight x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentPattern"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the left field of hydra.typeScript.syntax.AssignmentPattern+assignmentPatternWithLeft :: Typed.TypedTerm Syntax.AssignmentPattern -> Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm Syntax.AssignmentPattern+assignmentPatternWithLeft original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.AssignmentPattern"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.AssignmentPattern"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the right field of hydra.typeScript.syntax.AssignmentPattern+assignmentPatternWithRight :: Typed.TypedTerm Syntax.AssignmentPattern -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.AssignmentPattern+assignmentPatternWithRight original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.AssignmentPattern"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.BinaryExpression+binaryExpression :: Typed.TypedTerm Syntax.BinaryOperator -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.BinaryExpression+binaryExpression operator left right =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.BinaryExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "operator"),+ Core.fieldTerm = (Typed.unTypedTerm operator)},+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm left)},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm right)}]}))++-- | DSL accessor for the left field of hydra.typeScript.syntax.BinaryExpression+binaryExpressionLeft :: Typed.TypedTerm Syntax.BinaryExpression -> Typed.TypedTerm Syntax.Expression+binaryExpressionLeft x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryExpression"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the operator field of hydra.typeScript.syntax.BinaryExpression+binaryExpressionOperator :: Typed.TypedTerm Syntax.BinaryExpression -> Typed.TypedTerm Syntax.BinaryOperator+binaryExpressionOperator x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryExpression"),+ Core.projectionFieldName = (Core.Name "operator")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the right field of hydra.typeScript.syntax.BinaryExpression+binaryExpressionRight :: Typed.TypedTerm Syntax.BinaryExpression -> Typed.TypedTerm Syntax.Expression+binaryExpressionRight x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryExpression"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the left field of hydra.typeScript.syntax.BinaryExpression+binaryExpressionWithLeft :: Typed.TypedTerm Syntax.BinaryExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.BinaryExpression+binaryExpressionWithLeft original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.BinaryExpression"),+ Core.projectionFieldName = (Core.Name "operator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.BinaryExpression"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the operator field of hydra.typeScript.syntax.BinaryExpression+binaryExpressionWithOperator :: Typed.TypedTerm Syntax.BinaryExpression -> Typed.TypedTerm Syntax.BinaryOperator -> Typed.TypedTerm Syntax.BinaryExpression+binaryExpressionWithOperator original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.BinaryExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "operator"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.BinaryExpression"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.BinaryExpression"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the right field of hydra.typeScript.syntax.BinaryExpression+binaryExpressionWithRight :: Typed.TypedTerm Syntax.BinaryExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.BinaryExpression+binaryExpressionWithRight original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.BinaryExpression"),+ Core.projectionFieldName = (Core.Name "operator")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.BinaryExpression"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL injection for the add variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorAdd :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorAdd =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "add"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the and variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorAnd :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorAnd =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "and"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the bitwiseAnd variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorBitwiseAnd :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorBitwiseAnd =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "bitwiseAnd"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the bitwiseOr variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorBitwiseOr :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorBitwiseOr =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "bitwiseOr"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the bitwiseXor variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorBitwiseXor :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorBitwiseXor =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "bitwiseXor"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the divide variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorDivide :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorDivide =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "divide"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the equal variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorEqual :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorEqual =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "equal"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the exponentiate variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorExponentiate :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorExponentiate =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "exponentiate"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the greaterThan variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorGreaterThan :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorGreaterThan =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "greaterThan"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the greaterThanOrEqual variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorGreaterThanOrEqual :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorGreaterThanOrEqual =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "greaterThanOrEqual"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the in variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorIn :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorIn =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "in"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the instanceof variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorInstanceof :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorInstanceof =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "instanceof"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the leftShift variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorLeftShift :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorLeftShift =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "leftShift"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the lessThan variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorLessThan :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorLessThan =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "lessThan"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the lessThanOrEqual variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorLessThanOrEqual :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorLessThanOrEqual =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "lessThanOrEqual"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the modulo variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorModulo :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorModulo =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "modulo"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the multiply variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorMultiply :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorMultiply =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "multiply"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the notEqual variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorNotEqual :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorNotEqual =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "notEqual"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the nullishCoalescing variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorNullishCoalescing :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorNullishCoalescing =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "nullishCoalescing"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the or variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorOr :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorOr =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "or"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the rightShift variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorRightShift :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorRightShift =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "rightShift"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the strictEqual variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorStrictEqual :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorStrictEqual =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "strictEqual"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the strictNotEqual variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorStrictNotEqual :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorStrictNotEqual =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "strictNotEqual"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the subtract variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorSubtract :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorSubtract =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "subtract"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the unsignedRightShift variant of hydra.typeScript.syntax.BinaryOperator+binaryOperatorUnsignedRightShift :: Typed.TypedTerm Syntax.BinaryOperator+binaryOperatorUnsignedRightShift =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.BinaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "unsignedRightShift"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL constructor for hydra.typeScript.syntax.CallExpression+callExpression :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm [Syntax.Expression] -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.CallExpression+callExpression callee arguments optional =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.CallExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "callee"),+ Core.fieldTerm = (Typed.unTypedTerm callee)},+ Core.Field {+ Core.fieldName = (Core.Name "arguments"),+ Core.fieldTerm = (Typed.unTypedTerm arguments)},+ Core.Field {+ Core.fieldName = (Core.Name "optional"),+ Core.fieldTerm = (Typed.unTypedTerm optional)}]}))++-- | DSL accessor for the arguments field of hydra.typeScript.syntax.CallExpression+callExpressionArguments :: Typed.TypedTerm Syntax.CallExpression -> Typed.TypedTerm [Syntax.Expression]+callExpressionArguments x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.CallExpression"),+ Core.projectionFieldName = (Core.Name "arguments")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the callee field of hydra.typeScript.syntax.CallExpression+callExpressionCallee :: Typed.TypedTerm Syntax.CallExpression -> Typed.TypedTerm Syntax.Expression+callExpressionCallee x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.CallExpression"),+ Core.projectionFieldName = (Core.Name "callee")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the optional field of hydra.typeScript.syntax.CallExpression+callExpressionOptional :: Typed.TypedTerm Syntax.CallExpression -> Typed.TypedTerm Bool+callExpressionOptional x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.CallExpression"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the arguments field of hydra.typeScript.syntax.CallExpression+callExpressionWithArguments :: Typed.TypedTerm Syntax.CallExpression -> Typed.TypedTerm [Syntax.Expression] -> Typed.TypedTerm Syntax.CallExpression+callExpressionWithArguments original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.CallExpression"),+ Core.projectionFieldName = (Core.Name "callee")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "arguments"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.CallExpression"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the callee field of hydra.typeScript.syntax.CallExpression+callExpressionWithCallee :: Typed.TypedTerm Syntax.CallExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.CallExpression+callExpressionWithCallee original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.CallExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "callee"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.CallExpression"),+ Core.projectionFieldName = (Core.Name "arguments")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.CallExpression"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the optional field of hydra.typeScript.syntax.CallExpression+callExpressionWithOptional :: Typed.TypedTerm Syntax.CallExpression -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.CallExpression+callExpressionWithOptional original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.CallExpression"),+ Core.projectionFieldName = (Core.Name "callee")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.CallExpression"),+ Core.projectionFieldName = (Core.Name "arguments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "optional"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.CatchClause+catchClause :: Typed.TypedTerm (Maybe Syntax.Pattern) -> Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm Syntax.CatchClause+catchClause param body =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.CatchClause"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "param"),+ Core.fieldTerm = (Typed.unTypedTerm param)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.CatchClause+catchClauseBody :: Typed.TypedTerm Syntax.CatchClause -> Typed.TypedTerm Syntax.BlockStatement+catchClauseBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.CatchClause"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the param field of hydra.typeScript.syntax.CatchClause+catchClauseParam :: Typed.TypedTerm Syntax.CatchClause -> Typed.TypedTerm (Maybe Syntax.Pattern)+catchClauseParam x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.CatchClause"),+ Core.projectionFieldName = (Core.Name "param")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.CatchClause+catchClauseWithBody :: Typed.TypedTerm Syntax.CatchClause -> Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm Syntax.CatchClause+catchClauseWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.CatchClause"),+ Core.projectionFieldName = (Core.Name "param")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the param field of hydra.typeScript.syntax.CatchClause+catchClauseWithParam :: Typed.TypedTerm Syntax.CatchClause -> Typed.TypedTerm (Maybe Syntax.Pattern) -> Typed.TypedTerm Syntax.CatchClause+catchClauseWithParam original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.CatchClause"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "param"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.CatchClause"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.ClassDeclaration+classDeclaration :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm Syntax.ClassBody -> Typed.TypedTerm Syntax.ClassDeclaration+classDeclaration id superClass body =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ClassDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "id"),+ Core.fieldTerm = (Typed.unTypedTerm id)},+ Core.Field {+ Core.fieldName = (Core.Name "superClass"),+ Core.fieldTerm = (Typed.unTypedTerm superClass)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.ClassDeclaration+classDeclarationBody :: Typed.TypedTerm Syntax.ClassDeclaration -> Typed.TypedTerm Syntax.ClassBody+classDeclarationBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ClassDeclaration"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the id field of hydra.typeScript.syntax.ClassDeclaration+classDeclarationId :: Typed.TypedTerm Syntax.ClassDeclaration -> Typed.TypedTerm Syntax.Identifier+classDeclarationId x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ClassDeclaration"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the superClass field of hydra.typeScript.syntax.ClassDeclaration+classDeclarationSuperClass :: Typed.TypedTerm Syntax.ClassDeclaration -> Typed.TypedTerm (Maybe Syntax.Expression)+classDeclarationSuperClass x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ClassDeclaration"),+ Core.projectionFieldName = (Core.Name "superClass")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.ClassDeclaration+classDeclarationWithBody :: Typed.TypedTerm Syntax.ClassDeclaration -> Typed.TypedTerm Syntax.ClassBody -> Typed.TypedTerm Syntax.ClassDeclaration+classDeclarationWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ClassDeclaration"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ClassDeclaration"),+ Core.projectionFieldName = (Core.Name "superClass")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.ClassDeclarationWithComments+classDeclarationWithComments :: Typed.TypedTerm Syntax.ClassDeclaration -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.ClassDeclarationWithComments+classDeclarationWithComments body comments =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ClassDeclarationWithComments"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm comments)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.ClassDeclarationWithComments+classDeclarationWithCommentsBody :: Typed.TypedTerm Syntax.ClassDeclarationWithComments -> Typed.TypedTerm Syntax.ClassDeclaration+classDeclarationWithCommentsBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ClassDeclarationWithComments"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the comments field of hydra.typeScript.syntax.ClassDeclarationWithComments+classDeclarationWithCommentsComments :: Typed.TypedTerm Syntax.ClassDeclarationWithComments -> Typed.TypedTerm (Maybe Syntax.DocumentationComment)+classDeclarationWithCommentsComments x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ClassDeclarationWithComments"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.ClassDeclarationWithComments+classDeclarationWithCommentsWithBody :: Typed.TypedTerm Syntax.ClassDeclarationWithComments -> Typed.TypedTerm Syntax.ClassDeclaration -> Typed.TypedTerm Syntax.ClassDeclarationWithComments+classDeclarationWithCommentsWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ClassDeclarationWithComments"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ClassDeclarationWithComments"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the comments field of hydra.typeScript.syntax.ClassDeclarationWithComments+classDeclarationWithCommentsWithComments :: Typed.TypedTerm Syntax.ClassDeclarationWithComments -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.ClassDeclarationWithComments+classDeclarationWithCommentsWithComments original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ClassDeclarationWithComments"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the id field of hydra.typeScript.syntax.ClassDeclaration+classDeclarationWithId :: Typed.TypedTerm Syntax.ClassDeclaration -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.ClassDeclaration+classDeclarationWithId original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ClassDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "id"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ClassDeclaration"),+ Core.projectionFieldName = (Core.Name "superClass")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ClassDeclaration"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the superClass field of hydra.typeScript.syntax.ClassDeclaration+classDeclarationWithSuperClass :: Typed.TypedTerm Syntax.ClassDeclaration -> Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm Syntax.ClassDeclaration+classDeclarationWithSuperClass original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ClassDeclaration"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "superClass"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ClassDeclaration"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL injection for the block variant of hydra.typeScript.syntax.Comment+commentBlock :: Typed.TypedTerm String -> Typed.TypedTerm Syntax.Comment+commentBlock x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Comment"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "block"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the documentation variant of hydra.typeScript.syntax.Comment+commentDocumentation :: Typed.TypedTerm Syntax.DocumentationComment -> Typed.TypedTerm Syntax.Comment+commentDocumentation x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Comment"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "documentation"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the line variant of hydra.typeScript.syntax.Comment+commentLine :: Typed.TypedTerm String -> Typed.TypedTerm Syntax.Comment+commentLine x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Comment"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "line"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.ConditionalExpression+conditionalExpression :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ConditionalExpression+conditionalExpression test consequent alternate =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ConditionalExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm test)},+ Core.Field {+ Core.fieldName = (Core.Name "consequent"),+ Core.fieldTerm = (Typed.unTypedTerm consequent)},+ Core.Field {+ Core.fieldName = (Core.Name "alternate"),+ Core.fieldTerm = (Typed.unTypedTerm alternate)}]}))++-- | DSL accessor for the alternate field of hydra.typeScript.syntax.ConditionalExpression+conditionalExpressionAlternate :: Typed.TypedTerm Syntax.ConditionalExpression -> Typed.TypedTerm Syntax.Expression+conditionalExpressionAlternate x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ConditionalExpression"),+ Core.projectionFieldName = (Core.Name "alternate")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the consequent field of hydra.typeScript.syntax.ConditionalExpression+conditionalExpressionConsequent :: Typed.TypedTerm Syntax.ConditionalExpression -> Typed.TypedTerm Syntax.Expression+conditionalExpressionConsequent x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ConditionalExpression"),+ Core.projectionFieldName = (Core.Name "consequent")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the test field of hydra.typeScript.syntax.ConditionalExpression+conditionalExpressionTest :: Typed.TypedTerm Syntax.ConditionalExpression -> Typed.TypedTerm Syntax.Expression+conditionalExpressionTest x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ConditionalExpression"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the alternate field of hydra.typeScript.syntax.ConditionalExpression+conditionalExpressionWithAlternate :: Typed.TypedTerm Syntax.ConditionalExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ConditionalExpression+conditionalExpressionWithAlternate original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ConditionalExpression"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ConditionalExpression"),+ Core.projectionFieldName = (Core.Name "consequent")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "alternate"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the consequent field of hydra.typeScript.syntax.ConditionalExpression+conditionalExpressionWithConsequent :: Typed.TypedTerm Syntax.ConditionalExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ConditionalExpression+conditionalExpressionWithConsequent original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ConditionalExpression"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "consequent"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ConditionalExpression"),+ Core.projectionFieldName = (Core.Name "alternate")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the test field of hydra.typeScript.syntax.ConditionalExpression+conditionalExpressionWithTest :: Typed.TypedTerm Syntax.ConditionalExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ConditionalExpression+conditionalExpressionWithTest original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ConditionalExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ConditionalExpression"),+ Core.projectionFieldName = (Core.Name "consequent")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ConditionalExpression"),+ Core.projectionFieldName = (Core.Name "alternate")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.DoWhileStatement+doWhileStatement :: Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.DoWhileStatement+doWhileStatement body test =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.DoWhileStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)},+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm test)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.DoWhileStatement+doWhileStatementBody :: Typed.TypedTerm Syntax.DoWhileStatement -> Typed.TypedTerm Syntax.Statement+doWhileStatementBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.DoWhileStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the test field of hydra.typeScript.syntax.DoWhileStatement+doWhileStatementTest :: Typed.TypedTerm Syntax.DoWhileStatement -> Typed.TypedTerm Syntax.Expression+doWhileStatementTest x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.DoWhileStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.DoWhileStatement+doWhileStatementWithBody :: Typed.TypedTerm Syntax.DoWhileStatement -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.DoWhileStatement+doWhileStatementWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.DoWhileStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.DoWhileStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the test field of hydra.typeScript.syntax.DoWhileStatement+doWhileStatementWithTest :: Typed.TypedTerm Syntax.DoWhileStatement -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.DoWhileStatement+doWhileStatementWithTest original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.DoWhileStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.DocumentationComment+documentationComment :: Typed.TypedTerm String -> Typed.TypedTerm [Syntax.DocumentationTag] -> Typed.TypedTerm Syntax.DocumentationComment+documentationComment description tags =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationComment"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "description"),+ Core.fieldTerm = (Typed.unTypedTerm description)},+ Core.Field {+ Core.fieldName = (Core.Name "tags"),+ Core.fieldTerm = (Typed.unTypedTerm tags)}]}))++-- | DSL accessor for the description field of hydra.typeScript.syntax.DocumentationComment+documentationCommentDescription :: Typed.TypedTerm Syntax.DocumentationComment -> Typed.TypedTerm String+documentationCommentDescription x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationComment"),+ Core.projectionFieldName = (Core.Name "description")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the tags field of hydra.typeScript.syntax.DocumentationComment+documentationCommentTags :: Typed.TypedTerm Syntax.DocumentationComment -> Typed.TypedTerm [Syntax.DocumentationTag]+documentationCommentTags x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationComment"),+ Core.projectionFieldName = (Core.Name "tags")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the description field of hydra.typeScript.syntax.DocumentationComment+documentationCommentWithDescription :: Typed.TypedTerm Syntax.DocumentationComment -> Typed.TypedTerm String -> Typed.TypedTerm Syntax.DocumentationComment+documentationCommentWithDescription original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationComment"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "description"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.DocumentationComment"),+ Core.projectionFieldName = (Core.Name "tags")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the tags field of hydra.typeScript.syntax.DocumentationComment+documentationCommentWithTags :: Typed.TypedTerm Syntax.DocumentationComment -> Typed.TypedTerm [Syntax.DocumentationTag] -> Typed.TypedTerm Syntax.DocumentationComment+documentationCommentWithTags original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.DocumentationComment"),+ Core.projectionFieldName = (Core.Name "description")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "tags"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.DocumentationTag+documentationTag :: Typed.TypedTerm String -> Typed.TypedTerm (Maybe Syntax.TypeExpression) -> Typed.TypedTerm (Maybe Syntax.Identifier) -> Typed.TypedTerm String -> Typed.TypedTerm Syntax.DocumentationTag+documentationTag name type_ paramName description =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationTag"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm name)},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm type_)},+ Core.Field {+ Core.fieldName = (Core.Name "paramName"),+ Core.fieldTerm = (Typed.unTypedTerm paramName)},+ Core.Field {+ Core.fieldName = (Core.Name "description"),+ Core.fieldTerm = (Typed.unTypedTerm description)}]}))++-- | DSL accessor for the description field of hydra.typeScript.syntax.DocumentationTag+documentationTagDescription :: Typed.TypedTerm Syntax.DocumentationTag -> Typed.TypedTerm String+documentationTagDescription x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "description")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the name field of hydra.typeScript.syntax.DocumentationTag+documentationTagName :: Typed.TypedTerm Syntax.DocumentationTag -> Typed.TypedTerm String+documentationTagName x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the paramName field of hydra.typeScript.syntax.DocumentationTag+documentationTagParamName :: Typed.TypedTerm Syntax.DocumentationTag -> Typed.TypedTerm (Maybe Syntax.Identifier)+documentationTagParamName x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "paramName")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the type field of hydra.typeScript.syntax.DocumentationTag+documentationTagType :: Typed.TypedTerm Syntax.DocumentationTag -> Typed.TypedTerm (Maybe Syntax.TypeExpression)+documentationTagType x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the description field of hydra.typeScript.syntax.DocumentationTag+documentationTagWithDescription :: Typed.TypedTerm Syntax.DocumentationTag -> Typed.TypedTerm String -> Typed.TypedTerm Syntax.DocumentationTag+documentationTagWithDescription original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "paramName")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "description"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the name field of hydra.typeScript.syntax.DocumentationTag+documentationTagWithName :: Typed.TypedTerm Syntax.DocumentationTag -> Typed.TypedTerm String -> Typed.TypedTerm Syntax.DocumentationTag+documentationTagWithName original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.DocumentationTag"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm 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.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "paramName")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "description")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the paramName field of hydra.typeScript.syntax.DocumentationTag+documentationTagWithParamName :: Typed.TypedTerm Syntax.DocumentationTag -> Typed.TypedTerm (Maybe Syntax.Identifier) -> Typed.TypedTerm Syntax.DocumentationTag+documentationTagWithParamName original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "paramName"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "description")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the type field of hydra.typeScript.syntax.DocumentationTag+documentationTagWithType :: Typed.TypedTerm Syntax.DocumentationTag -> Typed.TypedTerm (Maybe Syntax.TypeExpression) -> Typed.TypedTerm Syntax.DocumentationTag+documentationTagWithType original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "paramName")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.DocumentationTag"),+ Core.projectionFieldName = (Core.Name "description")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.ExportAllDeclaration+exportAllDeclaration :: Typed.TypedTerm (Maybe Syntax.Identifier) -> Typed.TypedTerm Syntax.StringLiteral -> Typed.TypedTerm Syntax.ExportAllDeclaration+exportAllDeclaration exported source =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ExportAllDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "exported"),+ Core.fieldTerm = (Typed.unTypedTerm exported)},+ Core.Field {+ Core.fieldName = (Core.Name "source"),+ Core.fieldTerm = (Typed.unTypedTerm source)}]}))++-- | DSL accessor for the exported field of hydra.typeScript.syntax.ExportAllDeclaration+exportAllDeclarationExported :: Typed.TypedTerm Syntax.ExportAllDeclaration -> Typed.TypedTerm (Maybe Syntax.Identifier)+exportAllDeclarationExported x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ExportAllDeclaration"),+ Core.projectionFieldName = (Core.Name "exported")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the source field of hydra.typeScript.syntax.ExportAllDeclaration+exportAllDeclarationSource :: Typed.TypedTerm Syntax.ExportAllDeclaration -> Typed.TypedTerm Syntax.StringLiteral+exportAllDeclarationSource x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ExportAllDeclaration"),+ Core.projectionFieldName = (Core.Name "source")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the exported field of hydra.typeScript.syntax.ExportAllDeclaration+exportAllDeclarationWithExported :: Typed.TypedTerm Syntax.ExportAllDeclaration -> Typed.TypedTerm (Maybe Syntax.Identifier) -> Typed.TypedTerm Syntax.ExportAllDeclaration+exportAllDeclarationWithExported original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ExportAllDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "exported"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ExportAllDeclaration"),+ Core.projectionFieldName = (Core.Name "source")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the source field of hydra.typeScript.syntax.ExportAllDeclaration+exportAllDeclarationWithSource :: Typed.TypedTerm Syntax.ExportAllDeclaration -> Typed.TypedTerm Syntax.StringLiteral -> Typed.TypedTerm Syntax.ExportAllDeclaration+exportAllDeclarationWithSource original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ExportAllDeclaration"),+ Core.projectionFieldName = (Core.Name "exported")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "source"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL injection for the all variant of hydra.typeScript.syntax.ExportDeclaration+exportDeclarationAll :: Typed.TypedTerm Syntax.ExportAllDeclaration -> Typed.TypedTerm Syntax.ExportDeclaration+exportDeclarationAll x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ExportDeclaration"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "all"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the declaration variant of hydra.typeScript.syntax.ExportDeclaration+exportDeclarationDeclaration :: Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.ExportDeclaration+exportDeclarationDeclaration x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ExportDeclaration"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "declaration"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the default variant of hydra.typeScript.syntax.ExportDeclaration+exportDeclarationDefault :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ExportDeclaration+exportDeclarationDefault x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ExportDeclaration"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "default"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the named variant of hydra.typeScript.syntax.ExportDeclaration+exportDeclarationNamed :: Typed.TypedTerm Syntax.NamedExport -> Typed.TypedTerm Syntax.ExportDeclaration+exportDeclarationNamed x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ExportDeclaration"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "named"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.ExportSpecifier+exportSpecifier :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.ExportSpecifier+exportSpecifier local exported =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ExportSpecifier"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "local"),+ Core.fieldTerm = (Typed.unTypedTerm local)},+ Core.Field {+ Core.fieldName = (Core.Name "exported"),+ Core.fieldTerm = (Typed.unTypedTerm exported)}]}))++-- | DSL accessor for the exported field of hydra.typeScript.syntax.ExportSpecifier+exportSpecifierExported :: Typed.TypedTerm Syntax.ExportSpecifier -> Typed.TypedTerm Syntax.Identifier+exportSpecifierExported x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ExportSpecifier"),+ Core.projectionFieldName = (Core.Name "exported")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the local field of hydra.typeScript.syntax.ExportSpecifier+exportSpecifierLocal :: Typed.TypedTerm Syntax.ExportSpecifier -> Typed.TypedTerm Syntax.Identifier+exportSpecifierLocal x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ExportSpecifier"),+ Core.projectionFieldName = (Core.Name "local")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the exported field of hydra.typeScript.syntax.ExportSpecifier+exportSpecifierWithExported :: Typed.TypedTerm Syntax.ExportSpecifier -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.ExportSpecifier+exportSpecifierWithExported original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ExportSpecifier"),+ Core.projectionFieldName = (Core.Name "local")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "exported"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the local field of hydra.typeScript.syntax.ExportSpecifier+exportSpecifierWithLocal :: Typed.TypedTerm Syntax.ExportSpecifier -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.ExportSpecifier+exportSpecifierWithLocal original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ExportSpecifier"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "local"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ExportSpecifier"),+ Core.projectionFieldName = (Core.Name "exported")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL injection for the array variant of hydra.typeScript.syntax.Expression+expressionArray :: Typed.TypedTerm Syntax.ArrayExpression -> Typed.TypedTerm Syntax.Expression+expressionArray x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "array"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the arrow variant of hydra.typeScript.syntax.Expression+expressionArrow :: Typed.TypedTerm Syntax.ArrowFunctionExpression -> Typed.TypedTerm Syntax.Expression+expressionArrow x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "arrow"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the asExpression variant of hydra.typeScript.syntax.Expression+expressionAsExpression :: Typed.TypedTerm Syntax.AsExpression -> Typed.TypedTerm Syntax.Expression+expressionAsExpression x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "asExpression"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the assignment variant of hydra.typeScript.syntax.Expression+expressionAssignment :: Typed.TypedTerm Syntax.AssignmentExpression -> Typed.TypedTerm Syntax.Expression+expressionAssignment x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "assignment"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the await variant of hydra.typeScript.syntax.Expression+expressionAwait :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Expression+expressionAwait x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "await"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the binary variant of hydra.typeScript.syntax.Expression+expressionBinary :: Typed.TypedTerm Syntax.BinaryExpression -> Typed.TypedTerm Syntax.Expression+expressionBinary x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "binary"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the call variant of hydra.typeScript.syntax.Expression+expressionCall :: Typed.TypedTerm Syntax.CallExpression -> Typed.TypedTerm Syntax.Expression+expressionCall x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "call"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the conditional variant of hydra.typeScript.syntax.Expression+expressionConditional :: Typed.TypedTerm Syntax.ConditionalExpression -> Typed.TypedTerm Syntax.Expression+expressionConditional x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "conditional"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the function variant of hydra.typeScript.syntax.Expression+expressionFunction :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm Syntax.Expression+expressionFunction x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "function"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the identifier variant of hydra.typeScript.syntax.Expression+expressionIdentifier :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.Expression+expressionIdentifier x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "identifier"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the literal variant of hydra.typeScript.syntax.Expression+expressionLiteral :: Typed.TypedTerm Syntax.Literal -> Typed.TypedTerm Syntax.Expression+expressionLiteral x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "literal"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the member variant of hydra.typeScript.syntax.Expression+expressionMember :: Typed.TypedTerm Syntax.MemberExpression -> Typed.TypedTerm Syntax.Expression+expressionMember x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "member"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the new variant of hydra.typeScript.syntax.Expression+expressionNew :: Typed.TypedTerm Syntax.CallExpression -> Typed.TypedTerm Syntax.Expression+expressionNew x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "new"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the object variant of hydra.typeScript.syntax.Expression+expressionObject :: Typed.TypedTerm Syntax.ObjectExpression -> Typed.TypedTerm Syntax.Expression+expressionObject x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "object"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the parenthesized variant of hydra.typeScript.syntax.Expression+expressionParenthesized :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Expression+expressionParenthesized x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "parenthesized"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the sequence variant of hydra.typeScript.syntax.Expression+expressionSequence :: Typed.TypedTerm [Syntax.Expression] -> Typed.TypedTerm Syntax.Expression+expressionSequence x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "sequence"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the spread variant of hydra.typeScript.syntax.Expression+expressionSpread :: Typed.TypedTerm Syntax.SpreadElement -> Typed.TypedTerm Syntax.Expression+expressionSpread x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "spread"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the this variant of hydra.typeScript.syntax.Expression+expressionThis :: Typed.TypedTerm Syntax.Expression+expressionThis =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "this"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the unary variant of hydra.typeScript.syntax.Expression+expressionUnary :: Typed.TypedTerm Syntax.UnaryExpression -> Typed.TypedTerm Syntax.Expression+expressionUnary x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "unary"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the yield variant of hydra.typeScript.syntax.Expression+expressionYield :: Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm Syntax.Expression+expressionYield x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Expression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "yield"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the pattern variant of hydra.typeScript.syntax.ForInLeft+forInLeftPattern :: Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm Syntax.ForInLeft+forInLeftPattern x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ForInLeft"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "pattern"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the variable variant of hydra.typeScript.syntax.ForInLeft+forInLeftVariable :: Typed.TypedTerm Syntax.VariableDeclaration -> Typed.TypedTerm Syntax.ForInLeft+forInLeftVariable x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ForInLeft"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "variable"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.ForInStatement+forInStatement :: Typed.TypedTerm Syntax.ForInLeft -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.ForInStatement+forInStatement left right body =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ForInStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm left)},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm right)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.ForInStatement+forInStatementBody :: Typed.TypedTerm Syntax.ForInStatement -> Typed.TypedTerm Syntax.Statement+forInStatementBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForInStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the left field of hydra.typeScript.syntax.ForInStatement+forInStatementLeft :: Typed.TypedTerm Syntax.ForInStatement -> Typed.TypedTerm Syntax.ForInLeft+forInStatementLeft x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForInStatement"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the right field of hydra.typeScript.syntax.ForInStatement+forInStatementRight :: Typed.TypedTerm Syntax.ForInStatement -> Typed.TypedTerm Syntax.Expression+forInStatementRight x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForInStatement"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.ForInStatement+forInStatementWithBody :: Typed.TypedTerm Syntax.ForInStatement -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.ForInStatement+forInStatementWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ForInStatement"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForInStatement"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the left field of hydra.typeScript.syntax.ForInStatement+forInStatementWithLeft :: Typed.TypedTerm Syntax.ForInStatement -> Typed.TypedTerm Syntax.ForInLeft -> Typed.TypedTerm Syntax.ForInStatement+forInStatementWithLeft original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ForInStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ForInStatement"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForInStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the right field of hydra.typeScript.syntax.ForInStatement+forInStatementWithRight :: Typed.TypedTerm Syntax.ForInStatement -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ForInStatement+forInStatementWithRight original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ForInStatement"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ForInStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL injection for the expression variant of hydra.typeScript.syntax.ForInit+forInitExpression :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ForInit+forInitExpression x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ForInit"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "expression"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the variable variant of hydra.typeScript.syntax.ForInit+forInitVariable :: Typed.TypedTerm Syntax.VariableDeclaration -> Typed.TypedTerm Syntax.ForInit+forInitVariable x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ForInit"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "variable"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.ForOfStatement+forOfStatement :: Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.ForInLeft -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.ForOfStatement+forOfStatement await left right body =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ForOfStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "await"),+ Core.fieldTerm = (Typed.unTypedTerm await)},+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm left)},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm right)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)}]}))++-- | DSL accessor for the await field of hydra.typeScript.syntax.ForOfStatement+forOfStatementAwait :: Typed.TypedTerm Syntax.ForOfStatement -> Typed.TypedTerm Bool+forOfStatementAwait x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "await")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.ForOfStatement+forOfStatementBody :: Typed.TypedTerm Syntax.ForOfStatement -> Typed.TypedTerm Syntax.Statement+forOfStatementBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the left field of hydra.typeScript.syntax.ForOfStatement+forOfStatementLeft :: Typed.TypedTerm Syntax.ForOfStatement -> Typed.TypedTerm Syntax.ForInLeft+forOfStatementLeft x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the right field of hydra.typeScript.syntax.ForOfStatement+forOfStatementRight :: Typed.TypedTerm Syntax.ForOfStatement -> Typed.TypedTerm Syntax.Expression+forOfStatementRight x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the await field of hydra.typeScript.syntax.ForOfStatement+forOfStatementWithAwait :: Typed.TypedTerm Syntax.ForOfStatement -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.ForOfStatement+forOfStatementWithAwait original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ForOfStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "await"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the body field of hydra.typeScript.syntax.ForOfStatement+forOfStatementWithBody :: Typed.TypedTerm Syntax.ForOfStatement -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.ForOfStatement+forOfStatementWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "await")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the left field of hydra.typeScript.syntax.ForOfStatement+forOfStatementWithLeft :: Typed.TypedTerm Syntax.ForOfStatement -> Typed.TypedTerm Syntax.ForInLeft -> Typed.TypedTerm Syntax.ForOfStatement+forOfStatementWithLeft original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "await")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "left"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "right")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the right field of hydra.typeScript.syntax.ForOfStatement+forOfStatementWithRight :: Typed.TypedTerm Syntax.ForOfStatement -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ForOfStatement+forOfStatementWithRight original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "await")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "left")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "right"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ForOfStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.ForStatement+forStatement :: Typed.TypedTerm (Maybe Syntax.ForInit) -> Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.ForStatement+forStatement init test update body =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ForStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "init"),+ Core.fieldTerm = (Typed.unTypedTerm init)},+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm test)},+ Core.Field {+ Core.fieldName = (Core.Name "update"),+ Core.fieldTerm = (Typed.unTypedTerm update)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.ForStatement+forStatementBody :: Typed.TypedTerm Syntax.ForStatement -> Typed.TypedTerm Syntax.Statement+forStatementBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the init field of hydra.typeScript.syntax.ForStatement+forStatementInit :: Typed.TypedTerm Syntax.ForStatement -> Typed.TypedTerm (Maybe Syntax.ForInit)+forStatementInit x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "init")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the test field of hydra.typeScript.syntax.ForStatement+forStatementTest :: Typed.TypedTerm Syntax.ForStatement -> Typed.TypedTerm (Maybe Syntax.Expression)+forStatementTest x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the update field of hydra.typeScript.syntax.ForStatement+forStatementUpdate :: Typed.TypedTerm Syntax.ForStatement -> Typed.TypedTerm (Maybe Syntax.Expression)+forStatementUpdate x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "update")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.ForStatement+forStatementWithBody :: Typed.TypedTerm Syntax.ForStatement -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.ForStatement+forStatementWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "init")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "update")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the init field of hydra.typeScript.syntax.ForStatement+forStatementWithInit :: Typed.TypedTerm Syntax.ForStatement -> Typed.TypedTerm (Maybe Syntax.ForInit) -> Typed.TypedTerm Syntax.ForStatement+forStatementWithInit original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ForStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "init"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "update")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the test field of hydra.typeScript.syntax.ForStatement+forStatementWithTest :: Typed.TypedTerm Syntax.ForStatement -> Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm Syntax.ForStatement+forStatementWithTest original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "init")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "update")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the update field of hydra.typeScript.syntax.ForStatement+forStatementWithUpdate :: Typed.TypedTerm Syntax.ForStatement -> Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm Syntax.ForStatement+forStatementWithUpdate original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "init")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "update"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ForStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.FunctionDeclaration+functionDeclaration :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm [Syntax.Pattern] -> Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm Bool -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.FunctionDeclaration+functionDeclaration id params body async generator =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "id"),+ Core.fieldTerm = (Typed.unTypedTerm id)},+ Core.Field {+ Core.fieldName = (Core.Name "params"),+ Core.fieldTerm = (Typed.unTypedTerm params)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)},+ Core.Field {+ Core.fieldName = (Core.Name "async"),+ Core.fieldTerm = (Typed.unTypedTerm async)},+ Core.Field {+ Core.fieldName = (Core.Name "generator"),+ Core.fieldTerm = (Typed.unTypedTerm generator)}]}))++-- | DSL accessor for the async field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationAsync :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Bool+functionDeclarationAsync x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationBody :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Syntax.BlockStatement+functionDeclarationBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the generator field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationGenerator :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Bool+functionDeclarationGenerator x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the id field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationId :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Syntax.Identifier+functionDeclarationId x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the params field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationParams :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm [Syntax.Pattern]+functionDeclarationParams x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the async field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationWithAsync :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.FunctionDeclaration+functionDeclarationWithAsync original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "async"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the body field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationWithBody :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm Syntax.FunctionDeclaration+functionDeclarationWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.FunctionDeclarationWithComments+functionDeclarationWithComments :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.FunctionDeclarationWithComments+functionDeclarationWithComments body comments =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclarationWithComments"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm comments)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.FunctionDeclarationWithComments+functionDeclarationWithCommentsBody :: Typed.TypedTerm Syntax.FunctionDeclarationWithComments -> Typed.TypedTerm Syntax.FunctionDeclaration+functionDeclarationWithCommentsBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclarationWithComments"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the comments field of hydra.typeScript.syntax.FunctionDeclarationWithComments+functionDeclarationWithCommentsComments :: Typed.TypedTerm Syntax.FunctionDeclarationWithComments -> Typed.TypedTerm (Maybe Syntax.DocumentationComment)+functionDeclarationWithCommentsComments x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclarationWithComments"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.FunctionDeclarationWithComments+functionDeclarationWithCommentsWithBody :: Typed.TypedTerm Syntax.FunctionDeclarationWithComments -> Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Syntax.FunctionDeclarationWithComments+functionDeclarationWithCommentsWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclarationWithComments"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclarationWithComments"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the comments field of hydra.typeScript.syntax.FunctionDeclarationWithComments+functionDeclarationWithCommentsWithComments :: Typed.TypedTerm Syntax.FunctionDeclarationWithComments -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.FunctionDeclarationWithComments+functionDeclarationWithCommentsWithComments original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionDeclarationWithComments"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the generator field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationWithGenerator :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.FunctionDeclaration+functionDeclarationWithGenerator original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "generator"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the id field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationWithId :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.FunctionDeclaration+functionDeclarationWithId original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.FunctionDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "id"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the params field of hydra.typeScript.syntax.FunctionDeclaration+functionDeclarationWithParams :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm [Syntax.Pattern] -> Typed.TypedTerm Syntax.FunctionDeclaration+functionDeclarationWithParams original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "params"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionDeclaration"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.FunctionExpression+functionExpression :: Typed.TypedTerm (Maybe Syntax.Identifier) -> Typed.TypedTerm [Syntax.Pattern] -> Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm Bool -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.FunctionExpression+functionExpression id params body async generator =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.FunctionExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "id"),+ Core.fieldTerm = (Typed.unTypedTerm id)},+ Core.Field {+ Core.fieldName = (Core.Name "params"),+ Core.fieldTerm = (Typed.unTypedTerm params)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)},+ Core.Field {+ Core.fieldName = (Core.Name "async"),+ Core.fieldTerm = (Typed.unTypedTerm async)},+ Core.Field {+ Core.fieldName = (Core.Name "generator"),+ Core.fieldTerm = (Typed.unTypedTerm generator)}]}))++-- | DSL accessor for the async field of hydra.typeScript.syntax.FunctionExpression+functionExpressionAsync :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm Bool+functionExpressionAsync x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.FunctionExpression+functionExpressionBody :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm Syntax.BlockStatement+functionExpressionBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the generator field of hydra.typeScript.syntax.FunctionExpression+functionExpressionGenerator :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm Bool+functionExpressionGenerator x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the id field of hydra.typeScript.syntax.FunctionExpression+functionExpressionId :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm (Maybe Syntax.Identifier)+functionExpressionId x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the params field of hydra.typeScript.syntax.FunctionExpression+functionExpressionParams :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm [Syntax.Pattern]+functionExpressionParams x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the async field of hydra.typeScript.syntax.FunctionExpression+functionExpressionWithAsync :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.FunctionExpression+functionExpressionWithAsync original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "async"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the body field of hydra.typeScript.syntax.FunctionExpression+functionExpressionWithBody :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm Syntax.FunctionExpression+functionExpressionWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the generator field of hydra.typeScript.syntax.FunctionExpression+functionExpressionWithGenerator :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.FunctionExpression+functionExpressionWithGenerator original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "generator"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the id field of hydra.typeScript.syntax.FunctionExpression+functionExpressionWithId :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm (Maybe Syntax.Identifier) -> Typed.TypedTerm Syntax.FunctionExpression+functionExpressionWithId original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.FunctionExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "id"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "params")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the params field of hydra.typeScript.syntax.FunctionExpression+functionExpressionWithParams :: Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm [Syntax.Pattern] -> Typed.TypedTerm Syntax.FunctionExpression+functionExpressionWithParams original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "params"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "async")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionExpression"),+ Core.projectionFieldName = (Core.Name "generator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.FunctionTypeExpression+functionTypeExpression :: Typed.TypedTerm [Syntax.TypeParameter] -> Typed.TypedTerm [Syntax.TypeExpression] -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.FunctionTypeExpression+functionTypeExpression typeParameters parameters returnType =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.FunctionTypeExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "typeParameters"),+ Core.fieldTerm = (Typed.unTypedTerm typeParameters)},+ Core.Field {+ Core.fieldName = (Core.Name "parameters"),+ Core.fieldTerm = (Typed.unTypedTerm parameters)},+ Core.Field {+ Core.fieldName = (Core.Name "returnType"),+ Core.fieldTerm = (Typed.unTypedTerm returnType)}]}))++-- | DSL accessor for the parameters field of hydra.typeScript.syntax.FunctionTypeExpression+functionTypeExpressionParameters :: Typed.TypedTerm Syntax.FunctionTypeExpression -> Typed.TypedTerm [Syntax.TypeExpression]+functionTypeExpressionParameters x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionTypeExpression"),+ Core.projectionFieldName = (Core.Name "parameters")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the returnType field of hydra.typeScript.syntax.FunctionTypeExpression+functionTypeExpressionReturnType :: Typed.TypedTerm Syntax.FunctionTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+functionTypeExpressionReturnType x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionTypeExpression"),+ Core.projectionFieldName = (Core.Name "returnType")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the typeParameters field of hydra.typeScript.syntax.FunctionTypeExpression+functionTypeExpressionTypeParameters :: Typed.TypedTerm Syntax.FunctionTypeExpression -> Typed.TypedTerm [Syntax.TypeParameter]+functionTypeExpressionTypeParameters x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.FunctionTypeExpression"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the parameters field of hydra.typeScript.syntax.FunctionTypeExpression+functionTypeExpressionWithParameters :: Typed.TypedTerm Syntax.FunctionTypeExpression -> Typed.TypedTerm [Syntax.TypeExpression] -> Typed.TypedTerm Syntax.FunctionTypeExpression+functionTypeExpressionWithParameters original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionTypeExpression"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "parameters"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionTypeExpression"),+ Core.projectionFieldName = (Core.Name "returnType")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the returnType field of hydra.typeScript.syntax.FunctionTypeExpression+functionTypeExpressionWithReturnType :: Typed.TypedTerm Syntax.FunctionTypeExpression -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.FunctionTypeExpression+functionTypeExpressionWithReturnType original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.FunctionTypeExpression"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionTypeExpression"),+ Core.projectionFieldName = (Core.Name "parameters")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "returnType"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the typeParameters field of hydra.typeScript.syntax.FunctionTypeExpression+functionTypeExpressionWithTypeParameters :: Typed.TypedTerm Syntax.FunctionTypeExpression -> Typed.TypedTerm [Syntax.TypeParameter] -> Typed.TypedTerm Syntax.FunctionTypeExpression+functionTypeExpressionWithTypeParameters original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.FunctionTypeExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "typeParameters"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.FunctionTypeExpression"),+ Core.projectionFieldName = (Core.Name "parameters")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.FunctionTypeExpression"),+ Core.projectionFieldName = (Core.Name "returnType")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for the hydra.typeScript.syntax.Identifier wrapper+identifier :: Typed.TypedTerm String -> Typed.TypedTerm Syntax.Identifier+identifier x =+ Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {+ Core.wrappedTermTypeName = (Core.Name "hydra.typeScript.syntax.Identifier"),+ Core.wrappedTermBody = (Typed.unTypedTerm x)}))++-- | DSL constructor for hydra.typeScript.syntax.IfStatement+ifStatement :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm (Maybe Syntax.Statement) -> Typed.TypedTerm Syntax.IfStatement+ifStatement test consequent alternate =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.IfStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm test)},+ Core.Field {+ Core.fieldName = (Core.Name "consequent"),+ Core.fieldTerm = (Typed.unTypedTerm consequent)},+ Core.Field {+ Core.fieldName = (Core.Name "alternate"),+ Core.fieldTerm = (Typed.unTypedTerm alternate)}]}))++-- | DSL accessor for the alternate field of hydra.typeScript.syntax.IfStatement+ifStatementAlternate :: Typed.TypedTerm Syntax.IfStatement -> Typed.TypedTerm (Maybe Syntax.Statement)+ifStatementAlternate x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.IfStatement"),+ Core.projectionFieldName = (Core.Name "alternate")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the consequent field of hydra.typeScript.syntax.IfStatement+ifStatementConsequent :: Typed.TypedTerm Syntax.IfStatement -> Typed.TypedTerm Syntax.Statement+ifStatementConsequent x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.IfStatement"),+ Core.projectionFieldName = (Core.Name "consequent")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the test field of hydra.typeScript.syntax.IfStatement+ifStatementTest :: Typed.TypedTerm Syntax.IfStatement -> Typed.TypedTerm Syntax.Expression+ifStatementTest x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.IfStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the alternate field of hydra.typeScript.syntax.IfStatement+ifStatementWithAlternate :: Typed.TypedTerm Syntax.IfStatement -> Typed.TypedTerm (Maybe Syntax.Statement) -> Typed.TypedTerm Syntax.IfStatement+ifStatementWithAlternate original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.IfStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.IfStatement"),+ Core.projectionFieldName = (Core.Name "consequent")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "alternate"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the consequent field of hydra.typeScript.syntax.IfStatement+ifStatementWithConsequent :: Typed.TypedTerm Syntax.IfStatement -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.IfStatement+ifStatementWithConsequent original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.IfStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "consequent"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.IfStatement"),+ Core.projectionFieldName = (Core.Name "alternate")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the test field of hydra.typeScript.syntax.IfStatement+ifStatementWithTest :: Typed.TypedTerm Syntax.IfStatement -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.IfStatement+ifStatementWithTest original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.IfStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.IfStatement"),+ Core.projectionFieldName = (Core.Name "consequent")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.IfStatement"),+ Core.projectionFieldName = (Core.Name "alternate")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL injection for the default variant of hydra.typeScript.syntax.ImportClause+importClauseDefault :: Typed.TypedTerm Syntax.ImportDefaultSpecifier -> Typed.TypedTerm Syntax.ImportClause+importClauseDefault x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ImportClause"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "default"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the named variant of hydra.typeScript.syntax.ImportClause+importClauseNamed :: Typed.TypedTerm Syntax.ImportSpecifier -> Typed.TypedTerm Syntax.ImportClause+importClauseNamed x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ImportClause"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "named"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the namespace variant of hydra.typeScript.syntax.ImportClause+importClauseNamespace :: Typed.TypedTerm Syntax.ImportNamespaceSpecifier -> Typed.TypedTerm Syntax.ImportClause+importClauseNamespace x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ImportClause"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "namespace"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.ImportDeclaration+importDeclaration :: Typed.TypedTerm [Syntax.ImportClause] -> Typed.TypedTerm Syntax.StringLiteral -> Typed.TypedTerm Syntax.ImportDeclaration+importDeclaration specifiers source =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ImportDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "specifiers"),+ Core.fieldTerm = (Typed.unTypedTerm specifiers)},+ Core.Field {+ Core.fieldName = (Core.Name "source"),+ Core.fieldTerm = (Typed.unTypedTerm source)}]}))++-- | DSL accessor for the source field of hydra.typeScript.syntax.ImportDeclaration+importDeclarationSource :: Typed.TypedTerm Syntax.ImportDeclaration -> Typed.TypedTerm Syntax.StringLiteral+importDeclarationSource x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ImportDeclaration"),+ Core.projectionFieldName = (Core.Name "source")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the specifiers field of hydra.typeScript.syntax.ImportDeclaration+importDeclarationSpecifiers :: Typed.TypedTerm Syntax.ImportDeclaration -> Typed.TypedTerm [Syntax.ImportClause]+importDeclarationSpecifiers x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ImportDeclaration"),+ Core.projectionFieldName = (Core.Name "specifiers")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the source field of hydra.typeScript.syntax.ImportDeclaration+importDeclarationWithSource :: Typed.TypedTerm Syntax.ImportDeclaration -> Typed.TypedTerm Syntax.StringLiteral -> Typed.TypedTerm Syntax.ImportDeclaration+importDeclarationWithSource original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ImportDeclaration"),+ Core.projectionFieldName = (Core.Name "specifiers")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "source"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the specifiers field of hydra.typeScript.syntax.ImportDeclaration+importDeclarationWithSpecifiers :: Typed.TypedTerm Syntax.ImportDeclaration -> Typed.TypedTerm [Syntax.ImportClause] -> Typed.TypedTerm Syntax.ImportDeclaration+importDeclarationWithSpecifiers original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ImportDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "specifiers"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ImportDeclaration"),+ Core.projectionFieldName = (Core.Name "source")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for the hydra.typeScript.syntax.ImportDefaultSpecifier wrapper+importDefaultSpecifier :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.ImportDefaultSpecifier+importDefaultSpecifier x =+ Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {+ Core.wrappedTermTypeName = (Core.Name "hydra.typeScript.syntax.ImportDefaultSpecifier"),+ Core.wrappedTermBody = (Typed.unTypedTerm x)}))++-- | DSL constructor for the hydra.typeScript.syntax.ImportNamespaceSpecifier wrapper+importNamespaceSpecifier :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.ImportNamespaceSpecifier+importNamespaceSpecifier x =+ Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {+ Core.wrappedTermTypeName = (Core.Name "hydra.typeScript.syntax.ImportNamespaceSpecifier"),+ Core.wrappedTermBody = (Typed.unTypedTerm x)}))++-- | DSL constructor for hydra.typeScript.syntax.ImportSpecifier+importSpecifier :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.ImportSpecifier+importSpecifier imported local =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ImportSpecifier"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "imported"),+ Core.fieldTerm = (Typed.unTypedTerm imported)},+ Core.Field {+ Core.fieldName = (Core.Name "local"),+ Core.fieldTerm = (Typed.unTypedTerm local)}]}))++-- | DSL accessor for the imported field of hydra.typeScript.syntax.ImportSpecifier+importSpecifierImported :: Typed.TypedTerm Syntax.ImportSpecifier -> Typed.TypedTerm Syntax.Identifier+importSpecifierImported x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ImportSpecifier"),+ Core.projectionFieldName = (Core.Name "imported")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the local field of hydra.typeScript.syntax.ImportSpecifier+importSpecifierLocal :: Typed.TypedTerm Syntax.ImportSpecifier -> Typed.TypedTerm Syntax.Identifier+importSpecifierLocal x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ImportSpecifier"),+ Core.projectionFieldName = (Core.Name "local")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the imported field of hydra.typeScript.syntax.ImportSpecifier+importSpecifierWithImported :: Typed.TypedTerm Syntax.ImportSpecifier -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.ImportSpecifier+importSpecifierWithImported original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ImportSpecifier"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "imported"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ImportSpecifier"),+ Core.projectionFieldName = (Core.Name "local")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the local field of hydra.typeScript.syntax.ImportSpecifier+importSpecifierWithLocal :: Typed.TypedTerm Syntax.ImportSpecifier -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.ImportSpecifier+importSpecifierWithLocal original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ImportSpecifier"),+ Core.projectionFieldName = (Core.Name "imported")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "local"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.InterfaceDeclaration+interfaceDeclaration :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm [Syntax.TypeParameter] -> Typed.TypedTerm [Syntax.TypeExpression] -> Typed.TypedTerm [Syntax.PropertySignature] -> Typed.TypedTerm Syntax.InterfaceDeclaration+interfaceDeclaration name typeParameters extends members =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm name)},+ Core.Field {+ Core.fieldName = (Core.Name "typeParameters"),+ Core.fieldTerm = (Typed.unTypedTerm typeParameters)},+ Core.Field {+ Core.fieldName = (Core.Name "extends"),+ Core.fieldTerm = (Typed.unTypedTerm extends)},+ Core.Field {+ Core.fieldName = (Core.Name "members"),+ Core.fieldTerm = (Typed.unTypedTerm members)}]}))++-- | DSL accessor for the extends field of hydra.typeScript.syntax.InterfaceDeclaration+interfaceDeclarationExtends :: Typed.TypedTerm Syntax.InterfaceDeclaration -> Typed.TypedTerm [Syntax.TypeExpression]+interfaceDeclarationExtends x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "extends")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the members field of hydra.typeScript.syntax.InterfaceDeclaration+interfaceDeclarationMembers :: Typed.TypedTerm Syntax.InterfaceDeclaration -> Typed.TypedTerm [Syntax.PropertySignature]+interfaceDeclarationMembers x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "members")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the name field of hydra.typeScript.syntax.InterfaceDeclaration+interfaceDeclarationName :: Typed.TypedTerm Syntax.InterfaceDeclaration -> Typed.TypedTerm Syntax.Identifier+interfaceDeclarationName x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the typeParameters field of hydra.typeScript.syntax.InterfaceDeclaration+interfaceDeclarationTypeParameters :: Typed.TypedTerm Syntax.InterfaceDeclaration -> Typed.TypedTerm [Syntax.TypeParameter]+interfaceDeclarationTypeParameters x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the extends field of hydra.typeScript.syntax.InterfaceDeclaration+interfaceDeclarationWithExtends :: Typed.TypedTerm Syntax.InterfaceDeclaration -> Typed.TypedTerm [Syntax.TypeExpression] -> Typed.TypedTerm Syntax.InterfaceDeclaration+interfaceDeclarationWithExtends original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"),+ Core.recordFields = [+ 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.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "extends"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "members")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the members field of hydra.typeScript.syntax.InterfaceDeclaration+interfaceDeclarationWithMembers :: Typed.TypedTerm Syntax.InterfaceDeclaration -> Typed.TypedTerm [Syntax.PropertySignature] -> Typed.TypedTerm Syntax.InterfaceDeclaration+interfaceDeclarationWithMembers original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"),+ Core.recordFields = [+ 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.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "extends")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "members"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the name field of hydra.typeScript.syntax.InterfaceDeclaration+interfaceDeclarationWithName :: Typed.TypedTerm Syntax.InterfaceDeclaration -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.InterfaceDeclaration+interfaceDeclarationWithName original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "extends")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "members")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the typeParameters field of hydra.typeScript.syntax.InterfaceDeclaration+interfaceDeclarationWithTypeParameters :: Typed.TypedTerm Syntax.InterfaceDeclaration -> Typed.TypedTerm [Syntax.TypeParameter] -> Typed.TypedTerm Syntax.InterfaceDeclaration+interfaceDeclarationWithTypeParameters original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"),+ Core.recordFields = [+ 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.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "typeParameters"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "extends")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.InterfaceDeclaration"),+ Core.projectionFieldName = (Core.Name "members")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.LabeledStatement+labeledStatement :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.LabeledStatement+labeledStatement label body =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.LabeledStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "label"),+ Core.fieldTerm = (Typed.unTypedTerm label)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.LabeledStatement+labeledStatementBody :: Typed.TypedTerm Syntax.LabeledStatement -> Typed.TypedTerm Syntax.Statement+labeledStatementBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.LabeledStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the label field of hydra.typeScript.syntax.LabeledStatement+labeledStatementLabel :: Typed.TypedTerm Syntax.LabeledStatement -> Typed.TypedTerm Syntax.Identifier+labeledStatementLabel x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.LabeledStatement"),+ Core.projectionFieldName = (Core.Name "label")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.LabeledStatement+labeledStatementWithBody :: Typed.TypedTerm Syntax.LabeledStatement -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.LabeledStatement+labeledStatementWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.LabeledStatement"),+ Core.projectionFieldName = (Core.Name "label")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the label field of hydra.typeScript.syntax.LabeledStatement+labeledStatementWithLabel :: Typed.TypedTerm Syntax.LabeledStatement -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.LabeledStatement+labeledStatementWithLabel original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.LabeledStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "label"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.LabeledStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL injection for the bigInt variant of hydra.typeScript.syntax.Literal+literalBigInt :: Typed.TypedTerm Integer -> Typed.TypedTerm Syntax.Literal+literalBigInt x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Literal"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "bigInt"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the boolean variant of hydra.typeScript.syntax.Literal+literalBoolean :: Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.Literal+literalBoolean x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Literal"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "boolean"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the null variant of hydra.typeScript.syntax.Literal+literalNull :: Typed.TypedTerm Syntax.Literal+literalNull =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Literal"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "null"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the number variant of hydra.typeScript.syntax.Literal+literalNumber :: Typed.TypedTerm Syntax.NumericLiteral -> Typed.TypedTerm Syntax.Literal+literalNumber x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Literal"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "number"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the string variant of hydra.typeScript.syntax.Literal+literalString :: Typed.TypedTerm Syntax.StringLiteral -> Typed.TypedTerm Syntax.Literal+literalString x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Literal"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "string"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the template variant of hydra.typeScript.syntax.Literal+literalTemplate :: Typed.TypedTerm Syntax.TemplateLiteral -> Typed.TypedTerm Syntax.Literal+literalTemplate x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Literal"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "template"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the undefined variant of hydra.typeScript.syntax.Literal+literalUndefined :: Typed.TypedTerm Syntax.Literal+literalUndefined =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Literal"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "undefined"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL constructor for hydra.typeScript.syntax.MemberExpression+memberExpression :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Bool -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.MemberExpression+memberExpression object property computed optional =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.MemberExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "object"),+ Core.fieldTerm = (Typed.unTypedTerm object)},+ Core.Field {+ Core.fieldName = (Core.Name "property"),+ Core.fieldTerm = (Typed.unTypedTerm property)},+ Core.Field {+ Core.fieldName = (Core.Name "computed"),+ Core.fieldTerm = (Typed.unTypedTerm computed)},+ Core.Field {+ Core.fieldName = (Core.Name "optional"),+ Core.fieldTerm = (Typed.unTypedTerm optional)}]}))++-- | DSL accessor for the computed field of hydra.typeScript.syntax.MemberExpression+memberExpressionComputed :: Typed.TypedTerm Syntax.MemberExpression -> Typed.TypedTerm Bool+memberExpressionComputed x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the object field of hydra.typeScript.syntax.MemberExpression+memberExpressionObject :: Typed.TypedTerm Syntax.MemberExpression -> Typed.TypedTerm Syntax.Expression+memberExpressionObject x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "object")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the optional field of hydra.typeScript.syntax.MemberExpression+memberExpressionOptional :: Typed.TypedTerm Syntax.MemberExpression -> Typed.TypedTerm Bool+memberExpressionOptional x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the property field of hydra.typeScript.syntax.MemberExpression+memberExpressionProperty :: Typed.TypedTerm Syntax.MemberExpression -> Typed.TypedTerm Syntax.Expression+memberExpressionProperty x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "property")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the computed field of hydra.typeScript.syntax.MemberExpression+memberExpressionWithComputed :: Typed.TypedTerm Syntax.MemberExpression -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.MemberExpression+memberExpressionWithComputed original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "object")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "property")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "computed"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the object field of hydra.typeScript.syntax.MemberExpression+memberExpressionWithObject :: Typed.TypedTerm Syntax.MemberExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.MemberExpression+memberExpressionWithObject original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.MemberExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "object"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "property")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the optional field of hydra.typeScript.syntax.MemberExpression+memberExpressionWithOptional :: Typed.TypedTerm Syntax.MemberExpression -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.MemberExpression+memberExpressionWithOptional original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "object")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "property")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "optional"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the property field of hydra.typeScript.syntax.MemberExpression+memberExpressionWithProperty :: Typed.TypedTerm Syntax.MemberExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.MemberExpression+memberExpressionWithProperty original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "object")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "property"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MemberExpression"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.MethodDefinition+methodDefinition :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm Syntax.MethodKind -> Typed.TypedTerm Bool -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.MethodDefinition+methodDefinition key value kind computed static =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "key"),+ Core.fieldTerm = (Typed.unTypedTerm key)},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Typed.unTypedTerm value)},+ Core.Field {+ Core.fieldName = (Core.Name "kind"),+ Core.fieldTerm = (Typed.unTypedTerm kind)},+ Core.Field {+ Core.fieldName = (Core.Name "computed"),+ Core.fieldTerm = (Typed.unTypedTerm computed)},+ Core.Field {+ Core.fieldName = (Core.Name "static"),+ Core.fieldTerm = (Typed.unTypedTerm static)}]}))++-- | DSL accessor for the computed field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionComputed :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Bool+methodDefinitionComputed x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the key field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionKey :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Syntax.Expression+methodDefinitionKey x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the kind field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionKind :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Syntax.MethodKind+methodDefinitionKind x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the static field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionStatic :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Bool+methodDefinitionStatic x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "static")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the value field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionValue :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Syntax.FunctionExpression+methodDefinitionValue x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the computed field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionWithComputed :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.MethodDefinition+methodDefinitionWithComputed original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "computed"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "static")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the key field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionWithKey :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.MethodDefinition+methodDefinitionWithKey original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "key"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "static")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the kind field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionWithKind :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Syntax.MethodKind -> Typed.TypedTerm Syntax.MethodDefinition+methodDefinitionWithKind original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "kind"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "static")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the static field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionWithStatic :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.MethodDefinition+methodDefinitionWithStatic original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "static"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the value field of hydra.typeScript.syntax.MethodDefinition+methodDefinitionWithValue :: Typed.TypedTerm Syntax.MethodDefinition -> Typed.TypedTerm Syntax.FunctionExpression -> Typed.TypedTerm Syntax.MethodDefinition+methodDefinitionWithValue original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)},+ Core.Field {+ Core.fieldName = (Core.Name "kind"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.MethodDefinition"),+ Core.projectionFieldName = (Core.Name "static")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL injection for the constructor variant of hydra.typeScript.syntax.MethodKind+methodKindConstructor :: Typed.TypedTerm Syntax.MethodKind+methodKindConstructor =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "constructor"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the get variant of hydra.typeScript.syntax.MethodKind+methodKindGet :: Typed.TypedTerm Syntax.MethodKind+methodKindGet =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "get"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the method variant of hydra.typeScript.syntax.MethodKind+methodKindMethod :: Typed.TypedTerm Syntax.MethodKind+methodKindMethod =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "method"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the set variant of hydra.typeScript.syntax.MethodKind+methodKindSet :: Typed.TypedTerm Syntax.MethodKind+methodKindSet =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.MethodKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "set"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the export variant of hydra.typeScript.syntax.ModuleItem+moduleItemExport :: Typed.TypedTerm Syntax.ExportDeclaration -> Typed.TypedTerm Syntax.ModuleItem+moduleItemExport x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ModuleItem"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "export"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the import variant of hydra.typeScript.syntax.ModuleItem+moduleItemImport :: Typed.TypedTerm Syntax.ImportDeclaration -> Typed.TypedTerm Syntax.ModuleItem+moduleItemImport x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ModuleItem"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "import"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the interface variant of hydra.typeScript.syntax.ModuleItem+moduleItemInterface :: Typed.TypedTerm Syntax.InterfaceDeclaration -> Typed.TypedTerm Syntax.ModuleItem+moduleItemInterface x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ModuleItem"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "interface"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the statement variant of hydra.typeScript.syntax.ModuleItem+moduleItemStatement :: Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.ModuleItem+moduleItemStatement x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ModuleItem"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "statement"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the typeAlias variant of hydra.typeScript.syntax.ModuleItem+moduleItemTypeAlias :: Typed.TypedTerm Syntax.TypeAliasDeclaration -> Typed.TypedTerm Syntax.ModuleItem+moduleItemTypeAlias x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ModuleItem"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "typeAlias"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.ModuleItemWithComments+moduleItemWithComments :: Typed.TypedTerm Syntax.ModuleItem -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.ModuleItemWithComments+moduleItemWithComments body comments =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ModuleItemWithComments"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm comments)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.ModuleItemWithComments+moduleItemWithCommentsBody :: Typed.TypedTerm Syntax.ModuleItemWithComments -> Typed.TypedTerm Syntax.ModuleItem+moduleItemWithCommentsBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ModuleItemWithComments"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the comments field of hydra.typeScript.syntax.ModuleItemWithComments+moduleItemWithCommentsComments :: Typed.TypedTerm Syntax.ModuleItemWithComments -> Typed.TypedTerm (Maybe Syntax.DocumentationComment)+moduleItemWithCommentsComments x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ModuleItemWithComments"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.ModuleItemWithComments+moduleItemWithCommentsWithBody :: Typed.TypedTerm Syntax.ModuleItemWithComments -> Typed.TypedTerm Syntax.ModuleItem -> Typed.TypedTerm Syntax.ModuleItemWithComments+moduleItemWithCommentsWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ModuleItemWithComments"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ModuleItemWithComments"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the comments field of hydra.typeScript.syntax.ModuleItemWithComments+moduleItemWithCommentsWithComments :: Typed.TypedTerm Syntax.ModuleItemWithComments -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.ModuleItemWithComments+moduleItemWithCommentsWithComments original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ModuleItemWithComments"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.NamedExport+namedExport :: Typed.TypedTerm [Syntax.ExportSpecifier] -> Typed.TypedTerm (Maybe Syntax.StringLiteral) -> Typed.TypedTerm Syntax.NamedExport+namedExport specifiers source =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.NamedExport"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "specifiers"),+ Core.fieldTerm = (Typed.unTypedTerm specifiers)},+ Core.Field {+ Core.fieldName = (Core.Name "source"),+ Core.fieldTerm = (Typed.unTypedTerm source)}]}))++-- | DSL accessor for the source field of hydra.typeScript.syntax.NamedExport+namedExportSource :: Typed.TypedTerm Syntax.NamedExport -> Typed.TypedTerm (Maybe Syntax.StringLiteral)+namedExportSource x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.NamedExport"),+ Core.projectionFieldName = (Core.Name "source")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the specifiers field of hydra.typeScript.syntax.NamedExport+namedExportSpecifiers :: Typed.TypedTerm Syntax.NamedExport -> Typed.TypedTerm [Syntax.ExportSpecifier]+namedExportSpecifiers x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.NamedExport"),+ Core.projectionFieldName = (Core.Name "specifiers")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the source field of hydra.typeScript.syntax.NamedExport+namedExportWithSource :: Typed.TypedTerm Syntax.NamedExport -> Typed.TypedTerm (Maybe Syntax.StringLiteral) -> Typed.TypedTerm Syntax.NamedExport+namedExportWithSource original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.NamedExport"),+ Core.projectionFieldName = (Core.Name "specifiers")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "source"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the specifiers field of hydra.typeScript.syntax.NamedExport+namedExportWithSpecifiers :: Typed.TypedTerm Syntax.NamedExport -> Typed.TypedTerm [Syntax.ExportSpecifier] -> Typed.TypedTerm Syntax.NamedExport+namedExportWithSpecifiers original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.NamedExport"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "specifiers"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.NamedExport"),+ Core.projectionFieldName = (Core.Name "source")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL injection for the float variant of hydra.typeScript.syntax.NumericLiteral+numericLiteralFloat :: Typed.TypedTerm Double -> Typed.TypedTerm Syntax.NumericLiteral+numericLiteralFloat x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.NumericLiteral"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "float"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the integer variant of hydra.typeScript.syntax.NumericLiteral+numericLiteralInteger :: Typed.TypedTerm I.Int64 -> Typed.TypedTerm Syntax.NumericLiteral+numericLiteralInteger x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.NumericLiteral"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "integer"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.ObjectPattern+objectPattern :: Typed.TypedTerm [Syntax.ObjectPatternProperty] -> Typed.TypedTerm Syntax.ObjectPattern+objectPattern properties =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ObjectPattern"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "properties"),+ Core.fieldTerm = (Typed.unTypedTerm properties)}]}))++-- | DSL accessor for the properties field of hydra.typeScript.syntax.ObjectPattern+objectPatternProperties :: Typed.TypedTerm Syntax.ObjectPattern -> Typed.TypedTerm [Syntax.ObjectPatternProperty]+objectPatternProperties x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ObjectPattern"),+ Core.projectionFieldName = (Core.Name "properties")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL injection for the property variant of hydra.typeScript.syntax.ObjectPatternProperty+objectPatternPropertyProperty :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Syntax.ObjectPatternProperty+objectPatternPropertyProperty x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ObjectPatternProperty"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "property"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the rest variant of hydra.typeScript.syntax.ObjectPatternProperty+objectPatternPropertyRest :: Typed.TypedTerm Syntax.RestElement -> Typed.TypedTerm Syntax.ObjectPatternProperty+objectPatternPropertyRest x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.ObjectPatternProperty"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "rest"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL updater for the properties field of hydra.typeScript.syntax.ObjectPattern+objectPatternWithProperties :: Typed.TypedTerm Syntax.ObjectPattern -> Typed.TypedTerm [Syntax.ObjectPatternProperty] -> Typed.TypedTerm Syntax.ObjectPattern+objectPatternWithProperties original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ObjectPattern"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "properties"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.ParameterizedTypeExpression+parameterizedTypeExpression :: Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm [Syntax.TypeExpression] -> Typed.TypedTerm Syntax.ParameterizedTypeExpression+parameterizedTypeExpression base arguments =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ParameterizedTypeExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "base"),+ Core.fieldTerm = (Typed.unTypedTerm base)},+ Core.Field {+ Core.fieldName = (Core.Name "arguments"),+ Core.fieldTerm = (Typed.unTypedTerm arguments)}]}))++-- | DSL accessor for the arguments field of hydra.typeScript.syntax.ParameterizedTypeExpression+parameterizedTypeExpressionArguments :: Typed.TypedTerm Syntax.ParameterizedTypeExpression -> Typed.TypedTerm [Syntax.TypeExpression]+parameterizedTypeExpressionArguments x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ParameterizedTypeExpression"),+ Core.projectionFieldName = (Core.Name "arguments")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the base field of hydra.typeScript.syntax.ParameterizedTypeExpression+parameterizedTypeExpressionBase :: Typed.TypedTerm Syntax.ParameterizedTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+parameterizedTypeExpressionBase x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.ParameterizedTypeExpression"),+ Core.projectionFieldName = (Core.Name "base")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the arguments field of hydra.typeScript.syntax.ParameterizedTypeExpression+parameterizedTypeExpressionWithArguments :: Typed.TypedTerm Syntax.ParameterizedTypeExpression -> Typed.TypedTerm [Syntax.TypeExpression] -> Typed.TypedTerm Syntax.ParameterizedTypeExpression+parameterizedTypeExpressionWithArguments original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.ParameterizedTypeExpression"),+ Core.projectionFieldName = (Core.Name "base")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "arguments"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the base field of hydra.typeScript.syntax.ParameterizedTypeExpression+parameterizedTypeExpressionWithBase :: Typed.TypedTerm Syntax.ParameterizedTypeExpression -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.ParameterizedTypeExpression+parameterizedTypeExpressionWithBase original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.ParameterizedTypeExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "base"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.ParameterizedTypeExpression"),+ Core.projectionFieldName = (Core.Name "arguments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL injection for the array variant of hydra.typeScript.syntax.Pattern+patternArray :: Typed.TypedTerm Syntax.ArrayPattern -> Typed.TypedTerm Syntax.Pattern+patternArray x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Pattern"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "array"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the assignment variant of hydra.typeScript.syntax.Pattern+patternAssignment :: Typed.TypedTerm Syntax.AssignmentPattern -> Typed.TypedTerm Syntax.Pattern+patternAssignment x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Pattern"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "assignment"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the identifier variant of hydra.typeScript.syntax.Pattern+patternIdentifier :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.Pattern+patternIdentifier x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Pattern"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "identifier"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the object variant of hydra.typeScript.syntax.Pattern+patternObject :: Typed.TypedTerm Syntax.ObjectPattern -> Typed.TypedTerm Syntax.Pattern+patternObject x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Pattern"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "object"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the rest variant of hydra.typeScript.syntax.Pattern+patternRest :: Typed.TypedTerm Syntax.RestElement -> Typed.TypedTerm Syntax.Pattern+patternRest x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Pattern"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "rest"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the typed variant of hydra.typeScript.syntax.Pattern+patternTyped :: Typed.TypedTerm Syntax.TypedPattern -> Typed.TypedTerm Syntax.Pattern+patternTyped x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Pattern"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "typed"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.Program+program :: Typed.TypedTerm [Syntax.ModuleItem] -> Typed.TypedTerm Syntax.SourceType -> Typed.TypedTerm Syntax.Program+program body sourceType =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.Program"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)},+ Core.Field {+ Core.fieldName = (Core.Name "sourceType"),+ Core.fieldTerm = (Typed.unTypedTerm sourceType)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.Program+programBody :: Typed.TypedTerm Syntax.Program -> Typed.TypedTerm [Syntax.ModuleItem]+programBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Program"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the sourceType field of hydra.typeScript.syntax.Program+programSourceType :: Typed.TypedTerm Syntax.Program -> Typed.TypedTerm Syntax.SourceType+programSourceType x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Program"),+ Core.projectionFieldName = (Core.Name "sourceType")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.Program+programWithBody :: Typed.TypedTerm Syntax.Program -> Typed.TypedTerm [Syntax.ModuleItem] -> Typed.TypedTerm Syntax.Program+programWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.Program"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.Program"),+ Core.projectionFieldName = (Core.Name "sourceType")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the sourceType field of hydra.typeScript.syntax.Program+programWithSourceType :: Typed.TypedTerm Syntax.Program -> Typed.TypedTerm Syntax.SourceType -> Typed.TypedTerm Syntax.Program+programWithSourceType original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.Program"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "sourceType"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.Property+property :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.PropertyKind -> Typed.TypedTerm Bool -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.Property+property key value kind computed shorthand =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "key"),+ Core.fieldTerm = (Typed.unTypedTerm key)},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Typed.unTypedTerm value)},+ Core.Field {+ Core.fieldName = (Core.Name "kind"),+ Core.fieldTerm = (Typed.unTypedTerm kind)},+ Core.Field {+ Core.fieldName = (Core.Name "computed"),+ Core.fieldTerm = (Typed.unTypedTerm computed)},+ Core.Field {+ Core.fieldName = (Core.Name "shorthand"),+ Core.fieldTerm = (Typed.unTypedTerm shorthand)}]}))++-- | DSL accessor for the computed field of hydra.typeScript.syntax.Property+propertyComputed :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Bool+propertyComputed x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the key field of hydra.typeScript.syntax.Property+propertyKey :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Syntax.Expression+propertyKey x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the kind field of hydra.typeScript.syntax.Property+propertyKind :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Syntax.PropertyKind+propertyKind x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL injection for the get variant of hydra.typeScript.syntax.PropertyKind+propertyKindGet :: Typed.TypedTerm Syntax.PropertyKind+propertyKindGet =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertyKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "get"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the init variant of hydra.typeScript.syntax.PropertyKind+propertyKindInit :: Typed.TypedTerm Syntax.PropertyKind+propertyKindInit =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertyKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "init"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the set variant of hydra.typeScript.syntax.PropertyKind+propertyKindSet :: Typed.TypedTerm Syntax.PropertyKind+propertyKindSet =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertyKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "set"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL accessor for the shorthand field of hydra.typeScript.syntax.Property+propertyShorthand :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Bool+propertyShorthand x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "shorthand")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL constructor for hydra.typeScript.syntax.PropertySignature+propertySignature :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Bool -> Typed.TypedTerm Bool -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.PropertySignature+propertySignature name type_ optional readonly comments =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm name)},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm type_)},+ Core.Field {+ Core.fieldName = (Core.Name "optional"),+ Core.fieldTerm = (Typed.unTypedTerm optional)},+ Core.Field {+ Core.fieldName = (Core.Name "readonly"),+ Core.fieldTerm = (Typed.unTypedTerm readonly)},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm comments)}]}))++-- | DSL accessor for the comments field of hydra.typeScript.syntax.PropertySignature+propertySignatureComments :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm (Maybe Syntax.DocumentationComment)+propertySignatureComments x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the name field of hydra.typeScript.syntax.PropertySignature+propertySignatureName :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm Syntax.Identifier+propertySignatureName x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the optional field of hydra.typeScript.syntax.PropertySignature+propertySignatureOptional :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm Bool+propertySignatureOptional x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the readonly field of hydra.typeScript.syntax.PropertySignature+propertySignatureReadonly :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm Bool+propertySignatureReadonly x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "readonly")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the type field of hydra.typeScript.syntax.PropertySignature+propertySignatureType :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm Syntax.TypeExpression+propertySignatureType x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the comments field of hydra.typeScript.syntax.PropertySignature+propertySignatureWithComments :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.PropertySignature+propertySignatureWithComments original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "readonly")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the name field of hydra.typeScript.syntax.PropertySignature+propertySignatureWithName :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.PropertySignature+propertySignatureWithName original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm 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.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "readonly")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the optional field of hydra.typeScript.syntax.PropertySignature+propertySignatureWithOptional :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.PropertySignature+propertySignatureWithOptional original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "optional"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "readonly")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the readonly field of hydra.typeScript.syntax.PropertySignature+propertySignatureWithReadonly :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.PropertySignature+propertySignatureWithReadonly original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "readonly"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the type field of hydra.typeScript.syntax.PropertySignature+propertySignatureWithType :: Typed.TypedTerm Syntax.PropertySignature -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.PropertySignature+propertySignatureWithType original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "optional")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "readonly")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.PropertySignature"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL accessor for the value field of hydra.typeScript.syntax.Property+propertyValue :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Syntax.Expression+propertyValue x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the computed field of hydra.typeScript.syntax.Property+propertyWithComputed :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.Property+propertyWithComputed original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "computed"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "shorthand")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the key field of hydra.typeScript.syntax.Property+propertyWithKey :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Property+propertyWithKey original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "key"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "shorthand")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the kind field of hydra.typeScript.syntax.Property+propertyWithKind :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Syntax.PropertyKind -> Typed.TypedTerm Syntax.Property+propertyWithKind original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "kind"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "shorthand")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the shorthand field of hydra.typeScript.syntax.Property+propertyWithShorthand :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.Property+propertyWithShorthand original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "shorthand"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the value field of hydra.typeScript.syntax.Property+propertyWithValue :: Typed.TypedTerm Syntax.Property -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Property+propertyWithValue original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "key")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)},+ Core.Field {+ Core.fieldName = (Core.Name "kind"),+ Core.fieldTerm = (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "computed")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.Property"),+ Core.projectionFieldName = (Core.Name "shorthand")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for the hydra.typeScript.syntax.RestElement wrapper+restElement :: Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm Syntax.RestElement+restElement x =+ Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {+ Core.wrappedTermTypeName = (Core.Name "hydra.typeScript.syntax.RestElement"),+ Core.wrappedTermBody = (Typed.unTypedTerm x)}))++-- | DSL injection for the module variant of hydra.typeScript.syntax.SourceType+sourceTypeModule :: Typed.TypedTerm Syntax.SourceType+sourceTypeModule =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.SourceType"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "module"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the script variant of hydra.typeScript.syntax.SourceType+sourceTypeScript :: Typed.TypedTerm Syntax.SourceType+sourceTypeScript =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.SourceType"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "script"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL constructor for the hydra.typeScript.syntax.SpreadElement wrapper+spreadElement :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.SpreadElement+spreadElement x =+ Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {+ Core.wrappedTermTypeName = (Core.Name "hydra.typeScript.syntax.SpreadElement"),+ Core.wrappedTermBody = (Typed.unTypedTerm x)}))++-- | DSL injection for the block variant of hydra.typeScript.syntax.Statement+statementBlock :: Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm Syntax.Statement+statementBlock x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "block"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the break variant of hydra.typeScript.syntax.Statement+statementBreak :: Typed.TypedTerm Syntax.BreakStatement -> Typed.TypedTerm Syntax.Statement+statementBreak x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "break"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the classDeclaration variant of hydra.typeScript.syntax.Statement+statementClassDeclaration :: Typed.TypedTerm Syntax.ClassDeclaration -> Typed.TypedTerm Syntax.Statement+statementClassDeclaration x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "classDeclaration"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the continue variant of hydra.typeScript.syntax.Statement+statementContinue :: Typed.TypedTerm Syntax.ContinueStatement -> Typed.TypedTerm Syntax.Statement+statementContinue x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "continue"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the debugger variant of hydra.typeScript.syntax.Statement+statementDebugger :: Typed.TypedTerm Syntax.Statement+statementDebugger =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "debugger"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the doWhile variant of hydra.typeScript.syntax.Statement+statementDoWhile :: Typed.TypedTerm Syntax.DoWhileStatement -> Typed.TypedTerm Syntax.Statement+statementDoWhile x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "doWhile"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the empty variant of hydra.typeScript.syntax.Statement+statementEmpty :: Typed.TypedTerm Syntax.Statement+statementEmpty =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "empty"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the expression variant of hydra.typeScript.syntax.Statement+statementExpression :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Statement+statementExpression x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "expression"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the for variant of hydra.typeScript.syntax.Statement+statementFor :: Typed.TypedTerm Syntax.ForStatement -> Typed.TypedTerm Syntax.Statement+statementFor x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "for"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the forIn variant of hydra.typeScript.syntax.Statement+statementForIn :: Typed.TypedTerm Syntax.ForInStatement -> Typed.TypedTerm Syntax.Statement+statementForIn x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "forIn"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the forOf variant of hydra.typeScript.syntax.Statement+statementForOf :: Typed.TypedTerm Syntax.ForOfStatement -> Typed.TypedTerm Syntax.Statement+statementForOf x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "forOf"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the functionDeclaration variant of hydra.typeScript.syntax.Statement+statementFunctionDeclaration :: Typed.TypedTerm Syntax.FunctionDeclaration -> Typed.TypedTerm Syntax.Statement+statementFunctionDeclaration x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "functionDeclaration"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the if variant of hydra.typeScript.syntax.Statement+statementIf :: Typed.TypedTerm Syntax.IfStatement -> Typed.TypedTerm Syntax.Statement+statementIf x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "if"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the labeled variant of hydra.typeScript.syntax.Statement+statementLabeled :: Typed.TypedTerm Syntax.LabeledStatement -> Typed.TypedTerm Syntax.Statement+statementLabeled x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "labeled"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the return variant of hydra.typeScript.syntax.Statement+statementReturn :: Typed.TypedTerm Syntax.ReturnStatement -> Typed.TypedTerm Syntax.Statement+statementReturn x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "return"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the switch variant of hydra.typeScript.syntax.Statement+statementSwitch :: Typed.TypedTerm Syntax.SwitchStatement -> Typed.TypedTerm Syntax.Statement+statementSwitch x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "switch"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the throw variant of hydra.typeScript.syntax.Statement+statementThrow :: Typed.TypedTerm Syntax.ThrowStatement -> Typed.TypedTerm Syntax.Statement+statementThrow x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "throw"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the try variant of hydra.typeScript.syntax.Statement+statementTry :: Typed.TypedTerm Syntax.TryStatement -> Typed.TypedTerm Syntax.Statement+statementTry x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "try"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the variableDeclaration variant of hydra.typeScript.syntax.Statement+statementVariableDeclaration :: Typed.TypedTerm Syntax.VariableDeclaration -> Typed.TypedTerm Syntax.Statement+statementVariableDeclaration x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "variableDeclaration"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the while variant of hydra.typeScript.syntax.Statement+statementWhile :: Typed.TypedTerm Syntax.WhileStatement -> Typed.TypedTerm Syntax.Statement+statementWhile x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.Statement"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "while"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL constructor for hydra.typeScript.syntax.StatementWithComments+statementWithComments :: Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.StatementWithComments+statementWithComments body comments =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.StatementWithComments"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm comments)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.StatementWithComments+statementWithCommentsBody :: Typed.TypedTerm Syntax.StatementWithComments -> Typed.TypedTerm Syntax.Statement+statementWithCommentsBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.StatementWithComments"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the comments field of hydra.typeScript.syntax.StatementWithComments+statementWithCommentsComments :: Typed.TypedTerm Syntax.StatementWithComments -> Typed.TypedTerm (Maybe Syntax.DocumentationComment)+statementWithCommentsComments x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.StatementWithComments"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.StatementWithComments+statementWithCommentsWithBody :: Typed.TypedTerm Syntax.StatementWithComments -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.StatementWithComments+statementWithCommentsWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.StatementWithComments"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.StatementWithComments"),+ Core.projectionFieldName = (Core.Name "comments")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the comments field of hydra.typeScript.syntax.StatementWithComments+statementWithCommentsWithComments :: Typed.TypedTerm Syntax.StatementWithComments -> Typed.TypedTerm (Maybe Syntax.DocumentationComment) -> Typed.TypedTerm Syntax.StatementWithComments+statementWithCommentsWithComments original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.StatementWithComments"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "comments"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL constructor for hydra.typeScript.syntax.StringLiteral+stringLiteral :: Typed.TypedTerm String -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.StringLiteral+stringLiteral value singleQuote =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.StringLiteral"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Typed.unTypedTerm value)},+ Core.Field {+ Core.fieldName = (Core.Name "singleQuote"),+ Core.fieldTerm = (Typed.unTypedTerm singleQuote)}]}))++-- | DSL accessor for the singleQuote field of hydra.typeScript.syntax.StringLiteral+stringLiteralSingleQuote :: Typed.TypedTerm Syntax.StringLiteral -> Typed.TypedTerm Bool+stringLiteralSingleQuote x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.StringLiteral"),+ Core.projectionFieldName = (Core.Name "singleQuote")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the value field of hydra.typeScript.syntax.StringLiteral+stringLiteralValue :: Typed.TypedTerm Syntax.StringLiteral -> Typed.TypedTerm String+stringLiteralValue x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.StringLiteral"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the singleQuote field of hydra.typeScript.syntax.StringLiteral+stringLiteralWithSingleQuote :: Typed.TypedTerm Syntax.StringLiteral -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.StringLiteral+stringLiteralWithSingleQuote original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.StringLiteral"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "singleQuote"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the value field of hydra.typeScript.syntax.StringLiteral+stringLiteralWithValue :: Typed.TypedTerm Syntax.StringLiteral -> Typed.TypedTerm String -> Typed.TypedTerm Syntax.StringLiteral+stringLiteralWithValue original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.StringLiteral"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.StringLiteral"),+ Core.projectionFieldName = (Core.Name "singleQuote")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.SwitchCase+switchCase :: Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm [Syntax.Statement] -> Typed.TypedTerm Syntax.SwitchCase+switchCase test consequent =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.SwitchCase"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm test)},+ Core.Field {+ Core.fieldName = (Core.Name "consequent"),+ Core.fieldTerm = (Typed.unTypedTerm consequent)}]}))++-- | DSL accessor for the consequent field of hydra.typeScript.syntax.SwitchCase+switchCaseConsequent :: Typed.TypedTerm Syntax.SwitchCase -> Typed.TypedTerm [Syntax.Statement]+switchCaseConsequent x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.SwitchCase"),+ Core.projectionFieldName = (Core.Name "consequent")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the test field of hydra.typeScript.syntax.SwitchCase+switchCaseTest :: Typed.TypedTerm Syntax.SwitchCase -> Typed.TypedTerm (Maybe Syntax.Expression)+switchCaseTest x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.SwitchCase"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the consequent field of hydra.typeScript.syntax.SwitchCase+switchCaseWithConsequent :: Typed.TypedTerm Syntax.SwitchCase -> Typed.TypedTerm [Syntax.Statement] -> Typed.TypedTerm Syntax.SwitchCase+switchCaseWithConsequent original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.SwitchCase"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "consequent"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the test field of hydra.typeScript.syntax.SwitchCase+switchCaseWithTest :: Typed.TypedTerm Syntax.SwitchCase -> Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm Syntax.SwitchCase+switchCaseWithTest original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.SwitchCase"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.SwitchCase"),+ Core.projectionFieldName = (Core.Name "consequent")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.SwitchStatement+switchStatement :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm [Syntax.SwitchCase] -> Typed.TypedTerm Syntax.SwitchStatement+switchStatement discriminant cases =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.SwitchStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "discriminant"),+ Core.fieldTerm = (Typed.unTypedTerm discriminant)},+ Core.Field {+ Core.fieldName = (Core.Name "cases"),+ Core.fieldTerm = (Typed.unTypedTerm cases)}]}))++-- | DSL accessor for the cases field of hydra.typeScript.syntax.SwitchStatement+switchStatementCases :: Typed.TypedTerm Syntax.SwitchStatement -> Typed.TypedTerm [Syntax.SwitchCase]+switchStatementCases x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.SwitchStatement"),+ Core.projectionFieldName = (Core.Name "cases")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the discriminant field of hydra.typeScript.syntax.SwitchStatement+switchStatementDiscriminant :: Typed.TypedTerm Syntax.SwitchStatement -> Typed.TypedTerm Syntax.Expression+switchStatementDiscriminant x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.SwitchStatement"),+ Core.projectionFieldName = (Core.Name "discriminant")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the cases field of hydra.typeScript.syntax.SwitchStatement+switchStatementWithCases :: Typed.TypedTerm Syntax.SwitchStatement -> Typed.TypedTerm [Syntax.SwitchCase] -> Typed.TypedTerm Syntax.SwitchStatement+switchStatementWithCases original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.SwitchStatement"),+ Core.projectionFieldName = (Core.Name "discriminant")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "cases"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the discriminant field of hydra.typeScript.syntax.SwitchStatement+switchStatementWithDiscriminant :: Typed.TypedTerm Syntax.SwitchStatement -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.SwitchStatement+switchStatementWithDiscriminant original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.SwitchStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "discriminant"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.SwitchStatement"),+ Core.projectionFieldName = (Core.Name "cases")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.TemplateElement+templateElement :: Typed.TypedTerm String -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.TemplateElement+templateElement value tail =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TemplateElement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Typed.unTypedTerm value)},+ Core.Field {+ Core.fieldName = (Core.Name "tail"),+ Core.fieldTerm = (Typed.unTypedTerm tail)}]}))++-- | DSL accessor for the tail field of hydra.typeScript.syntax.TemplateElement+templateElementTail :: Typed.TypedTerm Syntax.TemplateElement -> Typed.TypedTerm Bool+templateElementTail x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TemplateElement"),+ Core.projectionFieldName = (Core.Name "tail")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the value field of hydra.typeScript.syntax.TemplateElement+templateElementValue :: Typed.TypedTerm Syntax.TemplateElement -> Typed.TypedTerm String+templateElementValue x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TemplateElement"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the tail field of hydra.typeScript.syntax.TemplateElement+templateElementWithTail :: Typed.TypedTerm Syntax.TemplateElement -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.TemplateElement+templateElementWithTail original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.TemplateElement"),+ Core.projectionFieldName = (Core.Name "value")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "tail"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the value field of hydra.typeScript.syntax.TemplateElement+templateElementWithValue :: Typed.TypedTerm Syntax.TemplateElement -> Typed.TypedTerm String -> Typed.TypedTerm Syntax.TemplateElement+templateElementWithValue original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TemplateElement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "value"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.TemplateElement"),+ Core.projectionFieldName = (Core.Name "tail")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.TemplateLiteral+templateLiteral :: Typed.TypedTerm [Syntax.TemplateElement] -> Typed.TypedTerm [Syntax.Expression] -> Typed.TypedTerm Syntax.TemplateLiteral+templateLiteral quasis expressions =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TemplateLiteral"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "quasis"),+ Core.fieldTerm = (Typed.unTypedTerm quasis)},+ Core.Field {+ Core.fieldName = (Core.Name "expressions"),+ Core.fieldTerm = (Typed.unTypedTerm expressions)}]}))++-- | DSL accessor for the expressions field of hydra.typeScript.syntax.TemplateLiteral+templateLiteralExpressions :: Typed.TypedTerm Syntax.TemplateLiteral -> Typed.TypedTerm [Syntax.Expression]+templateLiteralExpressions x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TemplateLiteral"),+ Core.projectionFieldName = (Core.Name "expressions")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the quasis field of hydra.typeScript.syntax.TemplateLiteral+templateLiteralQuasis :: Typed.TypedTerm Syntax.TemplateLiteral -> Typed.TypedTerm [Syntax.TemplateElement]+templateLiteralQuasis x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TemplateLiteral"),+ Core.projectionFieldName = (Core.Name "quasis")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the expressions field of hydra.typeScript.syntax.TemplateLiteral+templateLiteralWithExpressions :: Typed.TypedTerm Syntax.TemplateLiteral -> Typed.TypedTerm [Syntax.Expression] -> Typed.TypedTerm Syntax.TemplateLiteral+templateLiteralWithExpressions original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.TemplateLiteral"),+ Core.projectionFieldName = (Core.Name "quasis")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "expressions"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the quasis field of hydra.typeScript.syntax.TemplateLiteral+templateLiteralWithQuasis :: Typed.TypedTerm Syntax.TemplateLiteral -> Typed.TypedTerm [Syntax.TemplateElement] -> Typed.TypedTerm Syntax.TemplateLiteral+templateLiteralWithQuasis original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TemplateLiteral"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "quasis"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.TemplateLiteral"),+ Core.projectionFieldName = (Core.Name "expressions")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for the hydra.typeScript.syntax.ThrowStatement wrapper+throwStatement :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.ThrowStatement+throwStatement x =+ Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {+ Core.wrappedTermTypeName = (Core.Name "hydra.typeScript.syntax.ThrowStatement"),+ Core.wrappedTermBody = (Typed.unTypedTerm x)}))++-- | DSL constructor for hydra.typeScript.syntax.TryStatement+tryStatement :: Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm (Maybe Syntax.CatchClause) -> Typed.TypedTerm (Maybe Syntax.BlockStatement) -> Typed.TypedTerm Syntax.TryStatement+tryStatement block handler finalizer =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TryStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "block"),+ Core.fieldTerm = (Typed.unTypedTerm block)},+ Core.Field {+ Core.fieldName = (Core.Name "handler"),+ Core.fieldTerm = (Typed.unTypedTerm handler)},+ Core.Field {+ Core.fieldName = (Core.Name "finalizer"),+ Core.fieldTerm = (Typed.unTypedTerm finalizer)}]}))++-- | DSL accessor for the block field of hydra.typeScript.syntax.TryStatement+tryStatementBlock :: Typed.TypedTerm Syntax.TryStatement -> Typed.TypedTerm Syntax.BlockStatement+tryStatementBlock x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TryStatement"),+ Core.projectionFieldName = (Core.Name "block")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the finalizer field of hydra.typeScript.syntax.TryStatement+tryStatementFinalizer :: Typed.TypedTerm Syntax.TryStatement -> Typed.TypedTerm (Maybe Syntax.BlockStatement)+tryStatementFinalizer x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TryStatement"),+ Core.projectionFieldName = (Core.Name "finalizer")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the handler field of hydra.typeScript.syntax.TryStatement+tryStatementHandler :: Typed.TypedTerm Syntax.TryStatement -> Typed.TypedTerm (Maybe Syntax.CatchClause)+tryStatementHandler x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TryStatement"),+ Core.projectionFieldName = (Core.Name "handler")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the block field of hydra.typeScript.syntax.TryStatement+tryStatementWithBlock :: Typed.TypedTerm Syntax.TryStatement -> Typed.TypedTerm Syntax.BlockStatement -> Typed.TypedTerm Syntax.TryStatement+tryStatementWithBlock original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TryStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "block"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.TryStatement"),+ Core.projectionFieldName = (Core.Name "handler")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.TryStatement"),+ Core.projectionFieldName = (Core.Name "finalizer")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the finalizer field of hydra.typeScript.syntax.TryStatement+tryStatementWithFinalizer :: Typed.TypedTerm Syntax.TryStatement -> Typed.TypedTerm (Maybe Syntax.BlockStatement) -> Typed.TypedTerm Syntax.TryStatement+tryStatementWithFinalizer original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.TryStatement"),+ Core.projectionFieldName = (Core.Name "block")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.TryStatement"),+ Core.projectionFieldName = (Core.Name "handler")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "finalizer"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the handler field of hydra.typeScript.syntax.TryStatement+tryStatementWithHandler :: Typed.TypedTerm Syntax.TryStatement -> Typed.TypedTerm (Maybe Syntax.CatchClause) -> Typed.TypedTerm Syntax.TryStatement+tryStatementWithHandler original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.TryStatement"),+ Core.projectionFieldName = (Core.Name "block")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "handler"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.TryStatement"),+ Core.projectionFieldName = (Core.Name "finalizer")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.TypeAliasDeclaration+typeAliasDeclaration :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm [Syntax.TypeParameter] -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.TypeAliasDeclaration+typeAliasDeclaration name typeParameters type_ =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TypeAliasDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm name)},+ Core.Field {+ Core.fieldName = (Core.Name "typeParameters"),+ Core.fieldTerm = (Typed.unTypedTerm typeParameters)},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm type_)}]}))++-- | DSL accessor for the name field of hydra.typeScript.syntax.TypeAliasDeclaration+typeAliasDeclarationName :: Typed.TypedTerm Syntax.TypeAliasDeclaration -> Typed.TypedTerm Syntax.Identifier+typeAliasDeclarationName x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeAliasDeclaration"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the type field of hydra.typeScript.syntax.TypeAliasDeclaration+typeAliasDeclarationType :: Typed.TypedTerm Syntax.TypeAliasDeclaration -> Typed.TypedTerm Syntax.TypeExpression+typeAliasDeclarationType x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeAliasDeclaration"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the typeParameters field of hydra.typeScript.syntax.TypeAliasDeclaration+typeAliasDeclarationTypeParameters :: Typed.TypedTerm Syntax.TypeAliasDeclaration -> Typed.TypedTerm [Syntax.TypeParameter]+typeAliasDeclarationTypeParameters x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeAliasDeclaration"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the name field of hydra.typeScript.syntax.TypeAliasDeclaration+typeAliasDeclarationWithName :: Typed.TypedTerm Syntax.TypeAliasDeclaration -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.TypeAliasDeclaration+typeAliasDeclarationWithName original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TypeAliasDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.TypeAliasDeclaration"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.TypeAliasDeclaration"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the type field of hydra.typeScript.syntax.TypeAliasDeclaration+typeAliasDeclarationWithType :: Typed.TypedTerm Syntax.TypeAliasDeclaration -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.TypeAliasDeclaration+typeAliasDeclarationWithType original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TypeAliasDeclaration"),+ Core.recordFields = [+ 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.syntax.TypeAliasDeclaration"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.TypeAliasDeclaration"),+ Core.projectionFieldName = (Core.Name "typeParameters")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the typeParameters field of hydra.typeScript.syntax.TypeAliasDeclaration+typeAliasDeclarationWithTypeParameters :: Typed.TypedTerm Syntax.TypeAliasDeclaration -> Typed.TypedTerm [Syntax.TypeParameter] -> Typed.TypedTerm Syntax.TypeAliasDeclaration+typeAliasDeclarationWithTypeParameters original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TypeAliasDeclaration"),+ Core.recordFields = [+ 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.syntax.TypeAliasDeclaration"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "typeParameters"),+ Core.fieldTerm = (Typed.unTypedTerm 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.syntax.TypeAliasDeclaration"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for the hydra.typeScript.syntax.TypeAnnotation wrapper+typeAnnotation :: Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.TypeAnnotation+typeAnnotation x =+ Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {+ Core.wrappedTermTypeName = (Core.Name "hydra.typeScript.syntax.TypeAnnotation"),+ Core.wrappedTermBody = (Typed.unTypedTerm x)}))++-- | DSL injection for the any variant of hydra.typeScript.syntax.TypeExpression+typeExpressionAny :: Typed.TypedTerm Syntax.TypeExpression+typeExpressionAny =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "any"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the array variant of hydra.typeScript.syntax.TypeExpression+typeExpressionArray :: Typed.TypedTerm Syntax.ArrayTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionArray x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "array"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the function variant of hydra.typeScript.syntax.TypeExpression+typeExpressionFunction :: Typed.TypedTerm Syntax.FunctionTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionFunction x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "function"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the identifier variant of hydra.typeScript.syntax.TypeExpression+typeExpressionIdentifier :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionIdentifier x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "identifier"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the intersection variant of hydra.typeScript.syntax.TypeExpression+typeExpressionIntersection :: Typed.TypedTerm Syntax.IntersectionTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionIntersection x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "intersection"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the literal variant of hydra.typeScript.syntax.TypeExpression+typeExpressionLiteral :: Typed.TypedTerm Syntax.Literal -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionLiteral x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "literal"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the never variant of hydra.typeScript.syntax.TypeExpression+typeExpressionNever :: Typed.TypedTerm Syntax.TypeExpression+typeExpressionNever =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "never"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the object variant of hydra.typeScript.syntax.TypeExpression+typeExpressionObject :: Typed.TypedTerm Syntax.ObjectTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionObject x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "object"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the optional variant of hydra.typeScript.syntax.TypeExpression+typeExpressionOptional :: Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionOptional x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "optional"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the parameterized variant of hydra.typeScript.syntax.TypeExpression+typeExpressionParameterized :: Typed.TypedTerm Syntax.ParameterizedTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionParameterized x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "parameterized"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the readonly variant of hydra.typeScript.syntax.TypeExpression+typeExpressionReadonly :: Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionReadonly x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "readonly"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the tuple variant of hydra.typeScript.syntax.TypeExpression+typeExpressionTuple :: Typed.TypedTerm Syntax.TupleTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionTuple x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "tuple"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the union variant of hydra.typeScript.syntax.TypeExpression+typeExpressionUnion :: Typed.TypedTerm Syntax.UnionTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+typeExpressionUnion x =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "union"),+ Core.fieldTerm = (Typed.unTypedTerm x)}}))++-- | DSL injection for the unknown variant of hydra.typeScript.syntax.TypeExpression+typeExpressionUnknown :: Typed.TypedTerm Syntax.TypeExpression+typeExpressionUnknown =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "unknown"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the void variant of hydra.typeScript.syntax.TypeExpression+typeExpressionVoid :: Typed.TypedTerm Syntax.TypeExpression+typeExpressionVoid =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeExpression"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "void"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL constructor for hydra.typeScript.syntax.TypeParameter+typeParameter :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm (Maybe Syntax.TypeExpression) -> Typed.TypedTerm (Maybe Syntax.TypeExpression) -> Typed.TypedTerm Syntax.TypeParameter+typeParameter name constraint default_ =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TypeParameter"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm name)},+ Core.Field {+ Core.fieldName = (Core.Name "constraint"),+ Core.fieldTerm = (Typed.unTypedTerm constraint)},+ Core.Field {+ Core.fieldName = (Core.Name "default"),+ Core.fieldTerm = (Typed.unTypedTerm default_)}]}))++-- | DSL accessor for the constraint field of hydra.typeScript.syntax.TypeParameter+typeParameterConstraint :: Typed.TypedTerm Syntax.TypeParameter -> Typed.TypedTerm (Maybe Syntax.TypeExpression)+typeParameterConstraint x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeParameter"),+ Core.projectionFieldName = (Core.Name "constraint")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the default field of hydra.typeScript.syntax.TypeParameter+typeParameterDefault :: Typed.TypedTerm Syntax.TypeParameter -> Typed.TypedTerm (Maybe Syntax.TypeExpression)+typeParameterDefault x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeParameter"),+ Core.projectionFieldName = (Core.Name "default")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the name field of hydra.typeScript.syntax.TypeParameter+typeParameterName :: Typed.TypedTerm Syntax.TypeParameter -> Typed.TypedTerm Syntax.Identifier+typeParameterName x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TypeParameter"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the constraint field of hydra.typeScript.syntax.TypeParameter+typeParameterWithConstraint :: Typed.TypedTerm Syntax.TypeParameter -> Typed.TypedTerm (Maybe Syntax.TypeExpression) -> Typed.TypedTerm Syntax.TypeParameter+typeParameterWithConstraint original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.TypeParameter"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "constraint"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.TypeParameter"),+ Core.projectionFieldName = (Core.Name "default")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the default field of hydra.typeScript.syntax.TypeParameter+typeParameterWithDefault :: Typed.TypedTerm Syntax.TypeParameter -> Typed.TypedTerm (Maybe Syntax.TypeExpression) -> Typed.TypedTerm Syntax.TypeParameter+typeParameterWithDefault original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.TypeParameter"),+ Core.projectionFieldName = (Core.Name "name")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.TypeParameter"),+ Core.projectionFieldName = (Core.Name "constraint")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "default"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the name field of hydra.typeScript.syntax.TypeParameter+typeParameterWithName :: Typed.TypedTerm Syntax.TypeParameter -> Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm Syntax.TypeParameter+typeParameterWithName original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TypeParameter"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "name"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.TypeParameter"),+ Core.projectionFieldName = (Core.Name "constraint")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.TypeParameter"),+ Core.projectionFieldName = (Core.Name "default")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.TypedPattern+typedPattern :: Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.TypedPattern+typedPattern pattern type_ =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TypedPattern"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "pattern"),+ Core.fieldTerm = (Typed.unTypedTerm pattern)},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm type_)}]}))++-- | DSL accessor for the pattern field of hydra.typeScript.syntax.TypedPattern+typedPatternPattern :: Typed.TypedTerm Syntax.TypedPattern -> Typed.TypedTerm Syntax.Pattern+typedPatternPattern x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TypedPattern"),+ Core.projectionFieldName = (Core.Name "pattern")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the type field of hydra.typeScript.syntax.TypedPattern+typedPatternType :: Typed.TypedTerm Syntax.TypedPattern -> Typed.TypedTerm Syntax.TypeExpression+typedPatternType x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.TypedPattern"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the pattern field of hydra.typeScript.syntax.TypedPattern+typedPatternWithPattern :: Typed.TypedTerm Syntax.TypedPattern -> Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm Syntax.TypedPattern+typedPatternWithPattern original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TypedPattern"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "pattern"),+ Core.fieldTerm = (Typed.unTypedTerm 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.syntax.TypedPattern"),+ Core.projectionFieldName = (Core.Name "type")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the type field of hydra.typeScript.syntax.TypedPattern+typedPatternWithType :: Typed.TypedTerm Syntax.TypedPattern -> Typed.TypedTerm Syntax.TypeExpression -> Typed.TypedTerm Syntax.TypedPattern+typedPatternWithType original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.TypedPattern"),+ 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.typeScript.syntax.TypedPattern"),+ Core.projectionFieldName = (Core.Name "pattern")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "type"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL accessor for the body of hydra.typeScript.syntax.ArrayTypeExpression+unArrayTypeExpression :: Typed.TypedTerm Syntax.ArrayTypeExpression -> Typed.TypedTerm Syntax.TypeExpression+unArrayTypeExpression x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typeScript.syntax.ArrayTypeExpression")),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body of hydra.typeScript.syntax.Identifier+unIdentifier :: Typed.TypedTerm Syntax.Identifier -> Typed.TypedTerm String+unIdentifier x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typeScript.syntax.Identifier")),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body of hydra.typeScript.syntax.ImportDefaultSpecifier+unImportDefaultSpecifier :: Typed.TypedTerm Syntax.ImportDefaultSpecifier -> Typed.TypedTerm Syntax.Identifier+unImportDefaultSpecifier x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typeScript.syntax.ImportDefaultSpecifier")),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body of hydra.typeScript.syntax.ImportNamespaceSpecifier+unImportNamespaceSpecifier :: Typed.TypedTerm Syntax.ImportNamespaceSpecifier -> Typed.TypedTerm Syntax.Identifier+unImportNamespaceSpecifier x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typeScript.syntax.ImportNamespaceSpecifier")),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body of hydra.typeScript.syntax.RestElement+unRestElement :: Typed.TypedTerm Syntax.RestElement -> Typed.TypedTerm Syntax.Pattern+unRestElement x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typeScript.syntax.RestElement")),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body of hydra.typeScript.syntax.SpreadElement+unSpreadElement :: Typed.TypedTerm Syntax.SpreadElement -> Typed.TypedTerm Syntax.Expression+unSpreadElement x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typeScript.syntax.SpreadElement")),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body of hydra.typeScript.syntax.ThrowStatement+unThrowStatement :: Typed.TypedTerm Syntax.ThrowStatement -> Typed.TypedTerm Syntax.Expression+unThrowStatement x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typeScript.syntax.ThrowStatement")),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the body of hydra.typeScript.syntax.TypeAnnotation+unTypeAnnotation :: Typed.TypedTerm Syntax.TypeAnnotation -> Typed.TypedTerm Syntax.TypeExpression+unTypeAnnotation x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.typeScript.syntax.TypeAnnotation")),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL constructor for hydra.typeScript.syntax.UnaryExpression+unaryExpression :: Typed.TypedTerm Syntax.UnaryOperator -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.UnaryExpression+unaryExpression operator argument prefix =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.UnaryExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "operator"),+ Core.fieldTerm = (Typed.unTypedTerm operator)},+ Core.Field {+ Core.fieldName = (Core.Name "argument"),+ Core.fieldTerm = (Typed.unTypedTerm argument)},+ Core.Field {+ Core.fieldName = (Core.Name "prefix"),+ Core.fieldTerm = (Typed.unTypedTerm prefix)}]}))++-- | DSL accessor for the argument field of hydra.typeScript.syntax.UnaryExpression+unaryExpressionArgument :: Typed.TypedTerm Syntax.UnaryExpression -> Typed.TypedTerm Syntax.Expression+unaryExpressionArgument x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryExpression"),+ Core.projectionFieldName = (Core.Name "argument")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the operator field of hydra.typeScript.syntax.UnaryExpression+unaryExpressionOperator :: Typed.TypedTerm Syntax.UnaryExpression -> Typed.TypedTerm Syntax.UnaryOperator+unaryExpressionOperator x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryExpression"),+ Core.projectionFieldName = (Core.Name "operator")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the prefix field of hydra.typeScript.syntax.UnaryExpression+unaryExpressionPrefix :: Typed.TypedTerm Syntax.UnaryExpression -> Typed.TypedTerm Bool+unaryExpressionPrefix x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryExpression"),+ Core.projectionFieldName = (Core.Name "prefix")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the argument field of hydra.typeScript.syntax.UnaryExpression+unaryExpressionWithArgument :: Typed.TypedTerm Syntax.UnaryExpression -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.UnaryExpression+unaryExpressionWithArgument original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.UnaryExpression"),+ Core.projectionFieldName = (Core.Name "operator")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "argument"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.UnaryExpression"),+ Core.projectionFieldName = (Core.Name "prefix")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the operator field of hydra.typeScript.syntax.UnaryExpression+unaryExpressionWithOperator :: Typed.TypedTerm Syntax.UnaryExpression -> Typed.TypedTerm Syntax.UnaryOperator -> Typed.TypedTerm Syntax.UnaryExpression+unaryExpressionWithOperator original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.UnaryExpression"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "operator"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.UnaryExpression"),+ Core.projectionFieldName = (Core.Name "argument")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.UnaryExpression"),+ Core.projectionFieldName = (Core.Name "prefix")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the prefix field of hydra.typeScript.syntax.UnaryExpression+unaryExpressionWithPrefix :: Typed.TypedTerm Syntax.UnaryExpression -> Typed.TypedTerm Bool -> Typed.TypedTerm Syntax.UnaryExpression+unaryExpressionWithPrefix original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.UnaryExpression"),+ Core.projectionFieldName = (Core.Name "operator")})),+ Core.applicationArgument = (Typed.unTypedTerm 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.typeScript.syntax.UnaryExpression"),+ Core.projectionFieldName = (Core.Name "argument")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "prefix"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL injection for the bitwiseNot variant of hydra.typeScript.syntax.UnaryOperator+unaryOperatorBitwiseNot :: Typed.TypedTerm Syntax.UnaryOperator+unaryOperatorBitwiseNot =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "bitwiseNot"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the decrement variant of hydra.typeScript.syntax.UnaryOperator+unaryOperatorDecrement :: Typed.TypedTerm Syntax.UnaryOperator+unaryOperatorDecrement =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "decrement"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the delete variant of hydra.typeScript.syntax.UnaryOperator+unaryOperatorDelete :: Typed.TypedTerm Syntax.UnaryOperator+unaryOperatorDelete =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "delete"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the increment variant of hydra.typeScript.syntax.UnaryOperator+unaryOperatorIncrement :: Typed.TypedTerm Syntax.UnaryOperator+unaryOperatorIncrement =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "increment"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the negate variant of hydra.typeScript.syntax.UnaryOperator+unaryOperatorNegate :: Typed.TypedTerm Syntax.UnaryOperator+unaryOperatorNegate =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "negate"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the not variant of hydra.typeScript.syntax.UnaryOperator+unaryOperatorNot :: Typed.TypedTerm Syntax.UnaryOperator+unaryOperatorNot =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "not"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the plus variant of hydra.typeScript.syntax.UnaryOperator+unaryOperatorPlus :: Typed.TypedTerm Syntax.UnaryOperator+unaryOperatorPlus =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "plus"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the typeof variant of hydra.typeScript.syntax.UnaryOperator+unaryOperatorTypeof :: Typed.TypedTerm Syntax.UnaryOperator+unaryOperatorTypeof =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "typeof"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the void variant of hydra.typeScript.syntax.UnaryOperator+unaryOperatorVoid :: Typed.TypedTerm Syntax.UnaryOperator+unaryOperatorVoid =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.UnaryOperator"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "void"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL constructor for hydra.typeScript.syntax.VariableDeclaration+variableDeclaration :: Typed.TypedTerm Syntax.VariableKind -> Typed.TypedTerm [Syntax.VariableDeclarator] -> Typed.TypedTerm Syntax.VariableDeclaration+variableDeclaration kind declarations =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.VariableDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "kind"),+ Core.fieldTerm = (Typed.unTypedTerm kind)},+ Core.Field {+ Core.fieldName = (Core.Name "declarations"),+ Core.fieldTerm = (Typed.unTypedTerm declarations)}]}))++-- | DSL accessor for the declarations field of hydra.typeScript.syntax.VariableDeclaration+variableDeclarationDeclarations :: Typed.TypedTerm Syntax.VariableDeclaration -> Typed.TypedTerm [Syntax.VariableDeclarator]+variableDeclarationDeclarations x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.VariableDeclaration"),+ Core.projectionFieldName = (Core.Name "declarations")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the kind field of hydra.typeScript.syntax.VariableDeclaration+variableDeclarationKind :: Typed.TypedTerm Syntax.VariableDeclaration -> Typed.TypedTerm Syntax.VariableKind+variableDeclarationKind x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.VariableDeclaration"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the declarations field of hydra.typeScript.syntax.VariableDeclaration+variableDeclarationWithDeclarations :: Typed.TypedTerm Syntax.VariableDeclaration -> Typed.TypedTerm [Syntax.VariableDeclarator] -> Typed.TypedTerm Syntax.VariableDeclaration+variableDeclarationWithDeclarations original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.VariableDeclaration"),+ Core.projectionFieldName = (Core.Name "kind")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "declarations"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the kind field of hydra.typeScript.syntax.VariableDeclaration+variableDeclarationWithKind :: Typed.TypedTerm Syntax.VariableDeclaration -> Typed.TypedTerm Syntax.VariableKind -> Typed.TypedTerm Syntax.VariableDeclaration+variableDeclarationWithKind original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.VariableDeclaration"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "kind"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.VariableDeclaration"),+ Core.projectionFieldName = (Core.Name "declarations")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL constructor for hydra.typeScript.syntax.VariableDeclarator+variableDeclarator :: Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm Syntax.VariableDeclarator+variableDeclarator id init =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.VariableDeclarator"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "id"),+ Core.fieldTerm = (Typed.unTypedTerm id)},+ Core.Field {+ Core.fieldName = (Core.Name "init"),+ Core.fieldTerm = (Typed.unTypedTerm init)}]}))++-- | DSL accessor for the id field of hydra.typeScript.syntax.VariableDeclarator+variableDeclaratorId :: Typed.TypedTerm Syntax.VariableDeclarator -> Typed.TypedTerm Syntax.Pattern+variableDeclaratorId x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.VariableDeclarator"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the init field of hydra.typeScript.syntax.VariableDeclarator+variableDeclaratorInit :: Typed.TypedTerm Syntax.VariableDeclarator -> Typed.TypedTerm (Maybe Syntax.Expression)+variableDeclaratorInit x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.VariableDeclarator"),+ Core.projectionFieldName = (Core.Name "init")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the id field of hydra.typeScript.syntax.VariableDeclarator+variableDeclaratorWithId :: Typed.TypedTerm Syntax.VariableDeclarator -> Typed.TypedTerm Syntax.Pattern -> Typed.TypedTerm Syntax.VariableDeclarator+variableDeclaratorWithId original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.VariableDeclarator"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "id"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.VariableDeclarator"),+ Core.projectionFieldName = (Core.Name "init")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))++-- | DSL updater for the init field of hydra.typeScript.syntax.VariableDeclarator+variableDeclaratorWithInit :: Typed.TypedTerm Syntax.VariableDeclarator -> Typed.TypedTerm (Maybe Syntax.Expression) -> Typed.TypedTerm Syntax.VariableDeclarator+variableDeclaratorWithInit original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.VariableDeclarator"),+ Core.projectionFieldName = (Core.Name "id")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "init"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL injection for the const variant of hydra.typeScript.syntax.VariableKind+variableKindConst :: Typed.TypedTerm Syntax.VariableKind+variableKindConst =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.VariableKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "const"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the let variant of hydra.typeScript.syntax.VariableKind+variableKindLet :: Typed.TypedTerm Syntax.VariableKind+variableKindLet =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.VariableKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "let"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL injection for the var variant of hydra.typeScript.syntax.VariableKind+variableKindVar :: Typed.TypedTerm Syntax.VariableKind+variableKindVar =+ Typed.TypedTerm (Core.TermInject (Core.Injection {+ Core.injectionTypeName = (Core.Name "hydra.typeScript.syntax.VariableKind"),+ Core.injectionField = Core.Field {+ Core.fieldName = (Core.Name "var"),+ Core.fieldTerm = Core.TermUnit}}))++-- | DSL constructor for hydra.typeScript.syntax.WhileStatement+whileStatement :: Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.WhileStatement+whileStatement test body =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.WhileStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm test)},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm body)}]}))++-- | DSL accessor for the body field of hydra.typeScript.syntax.WhileStatement+whileStatementBody :: Typed.TypedTerm Syntax.WhileStatement -> Typed.TypedTerm Syntax.Statement+whileStatementBody x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.WhileStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL accessor for the test field of hydra.typeScript.syntax.WhileStatement+whileStatementTest :: Typed.TypedTerm Syntax.WhileStatement -> Typed.TypedTerm Syntax.Expression+whileStatementTest x =+ Typed.TypedTerm (Core.TermApplication (Core.Application {+ Core.applicationFunction = (Core.TermProject (Core.Projection {+ Core.projectionTypeName = (Core.Name "hydra.typeScript.syntax.WhileStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm x)}))++-- | DSL updater for the body field of hydra.typeScript.syntax.WhileStatement+whileStatementWithBody :: Typed.TypedTerm Syntax.WhileStatement -> Typed.TypedTerm Syntax.Statement -> Typed.TypedTerm Syntax.WhileStatement+whileStatementWithBody original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.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.typeScript.syntax.WhileStatement"),+ Core.projectionFieldName = (Core.Name "test")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))},+ Core.Field {+ Core.fieldName = (Core.Name "body"),+ Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))++-- | DSL updater for the test field of hydra.typeScript.syntax.WhileStatement+whileStatementWithTest :: Typed.TypedTerm Syntax.WhileStatement -> Typed.TypedTerm Syntax.Expression -> Typed.TypedTerm Syntax.WhileStatement+whileStatementWithTest original newVal =+ Typed.TypedTerm (Core.TermRecord (Core.Record {+ Core.recordTypeName = (Core.Name "hydra.typeScript.syntax.WhileStatement"),+ Core.recordFields = [+ Core.Field {+ Core.fieldName = (Core.Name "test"),+ Core.fieldTerm = (Typed.unTypedTerm 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.typeScript.syntax.WhileStatement"),+ Core.projectionFieldName = (Core.Name "body")})),+ Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+ src/main/haskell/Hydra/TypeScript/Coder.hs view
@@ -0,0 +1,1054 @@+-- Note: this is an automatically generated file. Do not edit.++-- | TypeScript code generator: emits TypeScript type declarations from Hydra modules++module Hydra.TypeScript.Coder where++import qualified Hydra.Analysis as Analysis+import qualified Hydra.Annotations as Annotations+import qualified Hydra.Arity as Arity+import qualified Hydra.Ast as Ast+import qualified Hydra.Coders as Coders+import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs+import qualified Hydra.Environment as Environment+import qualified Hydra.Error.Checking as Checking+import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile+import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem+import qualified Hydra.Errors as Errors+import qualified Hydra.File as File+import qualified Hydra.Formatting as Formatting+import qualified Hydra.Graph as Graph+import qualified Hydra.Json.Model as Model+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists+import qualified Hydra.Overlay.Haskell.Lib.Literals as Literals+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps+import qualified Hydra.Overlay.Haskell.Lib.Math as Math+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings+import qualified Hydra.Names as Names+import qualified Hydra.Packaging as Packaging+import qualified Hydra.Parsing as Parsing+import qualified Hydra.Paths as Paths+import qualified Hydra.Query as Query+import qualified Hydra.Relational as Relational+import qualified Hydra.Rewriting as Rewriting+import qualified Hydra.Scoping as Scoping+import qualified Hydra.Serialization as Serialization+import qualified Hydra.Show.Docs as ShowDocs+import qualified Hydra.Sorting as Sorting+import qualified Hydra.Strip as Strip+import qualified Hydra.System as System+import qualified Hydra.Tabular as Tabular+import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time+import qualified Hydra.Topology as Topology+import qualified Hydra.TypeScript.Language as Language+import qualified Hydra.TypeScript.Serde as Serde+import qualified Hydra.TypeScript.Syntax as Syntax+import qualified Hydra.Typed as Typed+import qualified Hydra.Typing as Typing+import qualified Hydra.Util as Util+import qualified Hydra.Validation as Validation+import qualified Hydra.Variables as Variables+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++analyzeTypeScriptFunction :: Typing.InferenceContext -> Graph.Graph -> Core.Term -> Either t0 (Typing.FunctionStructure Graph.Graph)+analyzeTypeScriptFunction cx g term = Analysis.analyzeFunctionTerm cx tsEnvGetGraph tsEnvSetGraph g term++collectForallParams :: Core.Type -> [Core.Name]+collectForallParams t =++ let dt = Strip.deannotateType t+ in case dt of+ Core.TypeForall v0 -> Lists.cons (Core.forallTypeParameter v0) (collectForallParams (Core.forallTypeBody v0))+ _ -> []++collectImports :: Packaging.ModuleName -> Core.Type -> S.Set Core.Name+collectImports currentNs t =++ let vars = Variables.freeVariablesInType t+ in (filterNonLocalNames currentNs vars)++collectInnerTypeImports :: Packaging.ModuleName -> Core.Term -> S.Set Core.Name+collectInnerTypeImports currentNs term =++ let subs = Rewriting.subterms term+ ownVars =+ case (Strip.deannotateTerm term) of+ Core.TermLambda v0 -> Optionals.cases (Core.lambdaDomain v0) Sets.empty (\d -> Variables.freeVariablesInType d)+ Core.TermTypeApplication v0 -> Variables.freeVariablesInType (Core.typeApplicationTermType v0)+ Core.TermTypeLambda _ -> Sets.empty+ Core.TermLet v0 -> Lists.foldl (\acc -> \b -> Optionals.cases (Core.bindingTypeScheme b) acc (\ts -> Sets.union acc (Variables.freeVariablesInType (Core.typeSchemeBody ts)))) Sets.empty (Core.letBindings v0)+ _ -> Sets.empty+ childVars = Lists.foldl (\acc -> \s -> Sets.union acc (collectInnerTypeImports currentNs s)) Sets.empty subs+ in (filterNonLocalNames currentNs (Sets.union ownVars childVars))++collectTermImports :: Packaging.ModuleName -> Core.Term -> S.Set Core.Name+collectTermImports currentNs t =++ let vars = Variables.freeVariablesInTerm t+ in (filterNonLocalNames currentNs vars)++encodeBindingAsStatement :: Typing.InferenceContext -> Graph.Graph -> Packaging.ModuleName -> Core.Binding -> Syntax.Statement+encodeBindingAsStatement cx g currentNs b =++ let bname = Core.bindingName b+ lname = Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords (Names.localNameOf bname)+ bterm = Core.bindingTerm b+ dterm = Strip.deannotateTerm bterm+ in case dterm of+ Core.TermLambda _ ->+ let innerFunDecl =+ functionDeclarationFromTerm cx g currentNs lname bterm (Optionals.bind (Core.bindingTypeScheme b) (\ts -> Just (Core.typeSchemeBody ts)))+ in (Syntax.StatementFunctionDeclaration innerFunDecl)+ _ ->+ let expr = encodeTerm cx g currentNs bterm+ declarator =+ Syntax.VariableDeclarator {+ Syntax.variableDeclaratorId = (Syntax.PatternIdentifier (tsIdent lname)),+ Syntax.variableDeclaratorInit = (Just expr)}+ varDecl =+ Syntax.VariableDeclaration {+ Syntax.variableDeclarationKind = Syntax.VariableKindConst,+ Syntax.variableDeclarationDeclarations = [+ declarator]}+ in (Syntax.StatementVariableDeclaration varDecl)++encodeLazyCall :: Typing.InferenceContext -> Graph.Graph -> Packaging.ModuleName -> Core.Term -> [Core.Term] -> [Bool] -> Syntax.Expression+encodeLazyCall cx g currentNs headTerm args lazyFlags =++ let headExpr = encodeTerm cx g currentNs headTerm+ paired = Lists.zip args lazyFlags+ renderArg =+ \p ->+ let argTerm = Pairs.first p+ isLazy = Pairs.second p+ expr = encodeTerm cx g currentNs argTerm+ in (Logic.ifElse isLazy (tsArrow [] expr) expr)+ argExprs = Lists.map renderArg paired+ in (tsCall headExpr argExprs)++encodeLiteral :: Core.Literal -> Syntax.Expression+encodeLiteral lit =++ let litExpr = \lit -> Syntax.ExpressionLiteral lit+ numLit = \i -> litExpr (Syntax.LiteralNumber (Syntax.NumericLiteralInteger i))+ floatLit = \f -> litExpr (Syntax.LiteralNumber (Syntax.NumericLiteralFloat f))+ strLit =+ \s -> litExpr (Syntax.LiteralString (Syntax.StringLiteral {+ Syntax.stringLiteralValue = s,+ Syntax.stringLiteralSingleQuote = False}))+ boolLit = \b -> litExpr (Syntax.LiteralBoolean b)+ bigIntCall = \txt -> tsCall (tsExprIdent "BigInt") [+ strLit txt]+ in case lit of+ Core.LiteralBinary v0 -> strLit (Literals.binaryToString v0)+ Core.LiteralBoolean v0 -> boolLit v0+ Core.LiteralDecimal v0 -> numLit (Literals.bigintToInt64 (Literals.decimalToBigint v0))+ Core.LiteralString v0 -> strLit v0+ Core.LiteralInteger v0 -> case v0 of+ Core.IntegerValueBigint v1 -> bigIntCall (Literals.showBigint v1)+ Core.IntegerValueInt8 v1 -> numLit (Literals.bigintToInt64 (Literals.int8ToBigint v1))+ Core.IntegerValueInt16 v1 -> numLit (Literals.bigintToInt64 (Literals.int16ToBigint v1))+ Core.IntegerValueInt32 v1 -> numLit (Literals.bigintToInt64 (Literals.int32ToBigint v1))+ Core.IntegerValueInt64 v1 -> bigIntCall (Literals.showInt64 v1)+ Core.IntegerValueUint8 v1 -> numLit (Literals.bigintToInt64 (Literals.uint8ToBigint v1))+ Core.IntegerValueUint16 v1 -> numLit (Literals.bigintToInt64 (Literals.uint16ToBigint v1))+ Core.IntegerValueUint32 v1 -> numLit (Literals.bigintToInt64 (Literals.uint32ToBigint v1))+ Core.IntegerValueUint64 v1 -> bigIntCall (Literals.showUint64 v1)+ _ -> numLit (Literals.bigintToInt64 (Literals.int32ToBigint 0))+ Core.LiteralFloat v0 -> case v0 of+ Core.FloatValueFloat32 v1 -> floatLit (Literals.float32ToFloat64 v1)+ Core.FloatValueFloat64 v1 -> floatLit v1+ _ -> floatLit 0.0+ _ -> litExpr Syntax.LiteralNull++encodeLiteralType :: Core.LiteralType -> Syntax.TypeExpression+encodeLiteralType lt =+ case lt of+ Core.LiteralTypeBinary -> tsParamApp1 "ReadonlyArray" (tsNamedType "number")+ Core.LiteralTypeBoolean -> tsNamedType "boolean"+ Core.LiteralTypeDecimal -> tsNamedType "number"+ Core.LiteralTypeFloat v0 -> case v0 of+ Core.FloatTypeFloat32 -> tsNamedType "number"+ Core.FloatTypeFloat64 -> tsNamedType "number"+ Core.LiteralTypeInteger v0 -> case v0 of+ Core.IntegerTypeBigint -> tsNamedType "bigint"+ Core.IntegerTypeInt8 -> tsNamedType "number"+ Core.IntegerTypeInt16 -> tsNamedType "number"+ Core.IntegerTypeInt32 -> tsNamedType "number"+ Core.IntegerTypeInt64 -> tsNamedType "bigint"+ Core.IntegerTypeUint8 -> tsNamedType "number"+ Core.IntegerTypeUint16 -> tsNamedType "number"+ Core.IntegerTypeUint32 -> tsNamedType "number"+ Core.IntegerTypeUint64 -> tsNamedType "bigint"+ Core.LiteralTypeString -> tsNamedType "string"++encodeParam :: t0 -> t1 -> Packaging.ModuleName -> Core.Name -> Core.Type -> Syntax.Pattern+encodeParam cx g currentNs pname dom =++ let nstr = sanitizeParamName pname+ in case (Strip.deannotateType dom) of+ Core.TypeVariable _ -> tsTypedIdent nstr Syntax.TypeExpressionAny+ _ -> tsTypedIdent nstr (encodeTypeOrAny cx g currentNs dom)++encodeTerm :: Typing.InferenceContext -> Graph.Graph -> Packaging.ModuleName -> Core.Term -> Syntax.Expression+encodeTerm cx g currentNs term =+ case term of+ Core.TermAnnotated v0 -> encodeTerm cx g currentNs (Core.annotatedTermBody v0)+ Core.TermLiteral v0 -> encodeLiteral v0+ Core.TermVariable v0 ->+ let local = Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords (Names.localNameOf v0)+ varExpr =+ Optionals.cases (Names.moduleNameOf v0) (tsExprIdent local) (\ns -> Logic.ifElse (Equality.equal (Packaging.unModuleName currentNs) (Packaging.unModuleName ns)) (tsExprIdent local) (+ let nsSegs = Lists.drop 1 (Strings.splitOn "." (Packaging.unModuleName ns))+ alias = Strings.cat2 "$mod_" (Strings.intercalate "_" nsSegs)+ in (tsMember (tsExprIdent alias) local)))+ in (Optionals.cases (Lexical.lookupPrimitive g v0) varExpr (\prim ->+ let isZeroArityEffect =+ Logic.and (Equality.equal (Arity.primitiveArity prim) 0) (Logic.not (Packaging.primitiveDefinitionIsPure (Graph.primitiveDefinition prim)))+ in (Logic.ifElse isZeroArityEffect (tsCall varExpr []) varExpr)))+ Core.TermLambda v0 ->+ let lamTerm = Core.TermLambda v0+ fsLE = analyzeTypeScriptFunction cx g lamTerm+ fsL =+ Eithers.either (\_err -> Typing.FunctionStructure {+ Typing.functionStructureTypeParams = [],+ Typing.functionStructureParams = [],+ Typing.functionStructureBindings = [],+ Typing.functionStructureBody = lamTerm,+ Typing.functionStructureDomains = [],+ Typing.functionStructureCodomain = Nothing,+ Typing.functionStructureEnvironment = g}) (\ok -> ok) fsLE+ fsLParams = Typing.functionStructureParams fsL+ fsLDoms = Typing.functionStructureDomains fsL+ fsLBindings = Typing.functionStructureBindings fsL+ fsLBody = Typing.functionStructureBody fsL+ fsLEnv = Typing.functionStructureEnvironment fsL+ innerBody =+ Logic.ifElse (Lists.null fsLBindings) fsLBody (Core.TermLet (Core.Let {+ Core.letBindings = fsLBindings,+ Core.letBody = fsLBody}))+ paramAcc =+ Lists.foldl (\acc -> \pn ->+ let idx = Pairs.first acc+ pats = Pairs.second acc+ raw = Names.localNameOf pn+ uniq = Logic.ifElse (Equality.equal raw "_") (Strings.cat2 "_" (Literals.showInt32 idx)) raw+ pat = tsTypedIdent (Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords uniq) Syntax.TypeExpressionAny+ in (Math.add idx 1, (Lists.concat2 pats [+ pat]))) (0, []) fsLParams+ paramPatterns = Pairs.second paramAcc+ bExpr = encodeTerm cx fsLEnv currentNs innerBody+ in (tsArrowTyped paramPatterns bExpr)+ Core.TermApplication v0 ->+ let asTerm = Core.TermApplication v0+ flat = flattenApplication asTerm+ headTerm = Pairs.first flat+ args = Pairs.second flat+ mName = termHeadVariable headTerm+ argc = Lists.length args+ lazyMaybe =+ Optionals.cases mName Nothing (\n ->+ let lazyFlags = lazyFlagsForPrimitive g n+ anyLazy = Lists.foldl (\b -> \f -> Logic.or b f) False lazyFlags+ in (Logic.ifElse (Logic.and anyLazy (Equality.equal argc (Lists.length lazyFlags))) (Just (encodeLazyCall cx g currentNs headTerm args lazyFlags)) Nothing))+ in (Optionals.cases lazyMaybe (+ let dHead = Strip.deannotateAndDetypeTerm headTerm+ encArgs = Lists.map (encodeTerm cx g currentNs) args+ in case dHead of+ Core.TermProject v1 -> Logic.ifElse (Lists.null encArgs) (+ let headExpr = encodeTerm cx g currentNs headTerm+ in headExpr) (+ let fname = Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords (Core.unName (Core.projectionFieldName v1))+ firstA = Optionals.fromOptional (tsExprIdent "undefined") (Lists.maybeHead encArgs)+ restA = Lists.drop 1 encArgs+ fieldExpr = tsMember firstA fname+ in (Logic.ifElse (Lists.null restA) fieldExpr (tsCall fieldExpr restA)))+ Core.TermUnwrap _ -> Logic.ifElse (Lists.null encArgs) (+ let headExpr = encodeTerm cx g currentNs headTerm+ in headExpr) (+ let firstA = Optionals.fromOptional (tsExprIdent "undefined") (Lists.maybeHead encArgs)+ restA = Lists.drop 1 encArgs+ valueExpr = tsMember firstA "value"+ in (Logic.ifElse (Lists.null restA) valueExpr (tsCall valueExpr restA)))+ _ ->+ let headExpr = encodeTerm cx g currentNs headTerm+ in (tsCall headExpr encArgs)) (\e -> e))+ Core.TermUnit -> tsUndefined+ Core.TermList v0 -> tsArray (Lists.map (encodeTerm cx g currentNs) v0)+ Core.TermSet v0 -> tsNew (tsExprIdent "Set") [+ tsArray (Lists.map (encodeTerm cx g currentNs) (Sets.toList v0))]+ Core.TermMap v0 -> tsNew (tsExprIdent "Map") [+ tsArray (Lists.map (\entry -> tsArray [+ encodeTerm cx g currentNs (Pairs.first entry),+ (encodeTerm cx g currentNs (Pairs.second entry))]) (Maps.toList v0))]+ Core.TermPair v0 -> tsAsAny (tsArray [+ encodeTerm cx g currentNs (Pairs.first v0),+ (encodeTerm cx g currentNs (Pairs.second v0))])+ Core.TermOptional v0 -> Optionals.cases v0 (tsAsAny (tsObject [+ ("tag", (tsExprStr "none"))])) (\v -> tsAsAny (tsObject [+ ("tag", (tsExprStr "given")),+ ("value", (encodeTerm cx g currentNs v))]))+ Core.TermRecord v0 ->+ let fields = Core.recordFields v0+ in (tsObject (Lists.map (\f -> (+ Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords (Core.unName (Core.fieldName f)),+ (encodeTerm cx g currentNs (Core.fieldTerm f)))) fields))+ Core.TermInject v0 ->+ let fname = Core.unName (Core.fieldName (Core.injectionField v0))+ fterm = Core.fieldTerm (Core.injectionField v0)+ isUnit =+ case (Strip.deannotateTerm fterm) of+ Core.TermUnit -> True+ _ -> False+ in (Logic.ifElse isUnit (tsAsAny (tsObject [+ ("tag", (tsExprStr fname))])) (tsAsAny (tsObject [+ ("tag", (tsExprStr fname)),+ ("value", (encodeTerm cx g currentNs fterm))])))+ Core.TermWrap v0 -> tsObject [+ ("value", (encodeTerm cx g currentNs (Core.wrappedTermBody v0)))]+ Core.TermLet v0 ->+ let bindings = sortBindingsTopologically (Core.letBindings v0)+ body = Core.letBody v0+ encodedBody = encodeTerm cx g currentNs body+ bindingStmts = Lists.map (\b -> encodeBindingAsStatement cx g currentNs b) bindings+ returnStmt = Syntax.StatementReturn (Just encodedBody)+ stmts = Lists.concat2 bindingStmts [+ returnStmt]+ iifeArrow =+ Syntax.ExpressionArrow (Syntax.ArrowFunctionExpression {+ Syntax.arrowFunctionExpressionParams = [],+ Syntax.arrowFunctionExpressionBody = (Syntax.ArrowFunctionBodyBlock stmts),+ Syntax.arrowFunctionExpressionAsync = False})+ in (tsCall iifeArrow [])+ Core.TermTypeApplication v0 -> encodeTerm cx g currentNs (Core.typeApplicationTermBody v0)+ Core.TermTypeLambda v0 -> encodeTerm cx g currentNs (Core.typeLambdaBody v0)+ Core.TermProject v0 ->+ let fname = Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords (Core.unName (Core.projectionFieldName v0))+ in (tsArrowTyped [+ tsTypedIdent "x" Syntax.TypeExpressionAny] (tsMember (tsExprIdent "x") fname))+ Core.TermUnwrap _ -> tsArrowTyped [+ tsTypedIdent "x" Syntax.TypeExpressionAny] (tsMember (tsExprIdent "x") "value")+ Core.TermCases v0 ->+ let armFields = Core.caseStatementCases v0+ defaultMaybe = Core.caseStatementDefault v0+ uVar = "u"+ uExpr = tsAsAny (tsExprIdent uVar)+ uTag = tsMember uExpr "tag"+ uValue = tsMember uExpr "value"+ armCases =+ Lists.map (\f ->+ let fname = Core.unName (Core.caseAlternativeName f)+ armExpr = encodeTerm cx g currentNs (Core.caseAlternativeHandler f)+ callExpr = tsCall armExpr [+ uValue]+ in Syntax.SwitchCase {+ Syntax.switchCaseTest = (Just (tsExprStr fname)),+ Syntax.switchCaseConsequent = [+ Syntax.StatementReturn (Just callExpr)]}) armFields+ defaultCase =+ Optionals.cases defaultMaybe (Syntax.SwitchCase {+ Syntax.switchCaseTest = Nothing,+ Syntax.switchCaseConsequent = [+ Syntax.StatementReturn (Just (tsCall (tsExprIdent "(() => { throw new Error('unmatched case'); })") []))]}) (\dt ->+ let dExpr = encodeTerm cx g currentNs dt+ in Syntax.SwitchCase {+ Syntax.switchCaseTest = Nothing,+ Syntax.switchCaseConsequent = [+ Syntax.StatementReturn (Just dExpr)]})+ allCases = Lists.concat2 armCases [+ defaultCase]+ switchStmt =+ Syntax.StatementSwitch (Syntax.SwitchStatement {+ Syntax.switchStatementDiscriminant = uTag,+ Syntax.switchStatementCases = allCases})+ in (Syntax.ExpressionArrow (Syntax.ArrowFunctionExpression {+ Syntax.arrowFunctionExpressionParams = [+ Syntax.PatternIdentifier (tsIdent uVar)],+ Syntax.arrowFunctionExpressionBody = (Syntax.ArrowFunctionBodyBlock [+ switchStmt]),+ Syntax.arrowFunctionExpressionAsync = False}))+ Core.TermEither v0 -> Eithers.either (\l -> tsAsAny (tsObject [+ ("tag", (tsExprStr "left")),+ ("value", (encodeTerm cx g currentNs l))])) (\r -> tsAsAny (tsObject [+ ("tag", (tsExprStr "right")),+ ("value", (encodeTerm cx g currentNs r))])) v0+ _ -> tsExprIdent "null"++encodeTermDefinition :: Typing.InferenceContext -> Graph.Graph -> Packaging.ModuleName -> Packaging.TermDefinition -> (Maybe String, Syntax.ModuleItem)+encodeTermDefinition cx g currentNs td =++ let name = Packaging.termDefinitionName td+ lname = Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords (Names.localNameOf name)+ rawTerm = Packaging.termDefinitionBody td+ mdoc = Eithers.either (\_ -> Nothing) (\x_ -> x_) (Annotations.getTermDescription cx g rawTerm)+ asExport = \stmt -> Syntax.ModuleItemExport (Syntax.ExportDeclarationDeclaration stmt)+ mScheme =+ Optionals.bind (Packaging.termDefinitionSignature td) (\sig -> Just (Core.typeSchemeBody (Scoping.termSignatureToTypeScheme sig)))+ dterm = Strip.deannotateTerm rawTerm+ funDecl = functionDeclarationFromTerm cx g currentNs lname rawTerm mScheme+ asFunDecl = asExport (Syntax.StatementFunctionDeclaration funDecl)+ item =+ case dterm of+ Core.TermLambda _ -> asFunDecl+ Core.TermTypeLambda _ -> asFunDecl+ _ ->+ let expr = encodeTerm cx g currentNs rawTerm+ declarator =+ Syntax.VariableDeclarator {+ Syntax.variableDeclaratorId = (Syntax.PatternIdentifier (tsIdent lname)),+ Syntax.variableDeclaratorInit = (Just expr)}+ varDecl =+ Syntax.VariableDeclaration {+ Syntax.variableDeclarationKind = Syntax.VariableKindConst,+ Syntax.variableDeclarationDeclarations = [+ declarator]}+ in (asExport (Syntax.StatementVariableDeclaration varDecl))+ in (mdoc, item)++encodeType :: t0 -> t1 -> Packaging.ModuleName -> Core.Type -> Either t2 Syntax.TypeExpression+encodeType cx g currentNs t =++ let typ = Strip.deannotateType t+ in case typ of+ Core.TypeAnnotated v0 -> encodeType cx g currentNs (Core.annotatedTypeBody v0)+ Core.TypeApplication v0 ->+ let fnTyp = Core.applicationTypeFunction v0+ argTyp = Core.applicationTypeArgument v0+ in (Eithers.bind (encodeType cx g currentNs fnTyp) (\encFn -> Eithers.bind (encodeType cx g currentNs argTyp) (\encArg -> case encFn of+ Syntax.TypeExpressionIdentifier _ -> Right (Syntax.TypeExpressionParameterized (Syntax.ParameterizedTypeExpression {+ Syntax.parameterizedTypeExpressionBase = encFn,+ Syntax.parameterizedTypeExpressionArguments = [+ encArg]}))+ Syntax.TypeExpressionParameterized v1 -> Right (Syntax.TypeExpressionParameterized (Syntax.ParameterizedTypeExpression {+ Syntax.parameterizedTypeExpressionBase = (Syntax.parameterizedTypeExpressionBase v1),+ Syntax.parameterizedTypeExpressionArguments = (Lists.concat2 (Syntax.parameterizedTypeExpressionArguments v1) [+ encArg])}))+ _ -> Right encFn)))+ Core.TypeForall v0 -> encodeType cx g currentNs (Core.forallTypeBody v0)+ Core.TypeUnit -> Right Syntax.TypeExpressionVoid+ Core.TypeVoid -> Right Syntax.TypeExpressionNever+ Core.TypeLiteral v0 -> Right (encodeLiteralType v0)+ Core.TypeList v0 -> Eithers.map (\enc -> tsParamApp1 "ReadonlyArray" enc) (encodeType cx g currentNs v0)+ Core.TypeSet v0 -> Eithers.map tsReadonlySet (encodeType cx g currentNs v0)+ Core.TypeMap v0 -> Eithers.bind (encodeType cx g currentNs (Core.mapTypeKeys v0)) (\kt -> Eithers.bind (encodeType cx g currentNs (Core.mapTypeValues v0)) (\vt -> Right (tsReadonlyMap kt vt)))+ Core.TypeOptional v0 -> Eithers.map (\enc -> Syntax.TypeExpressionUnion [+ Syntax.TypeExpressionObject [+ tsPropSig "tag" False (Syntax.TypeExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral {+ Syntax.stringLiteralValue = "given",+ Syntax.stringLiteralSingleQuote = False}))),+ (tsPropSig "value" False enc)],+ (Syntax.TypeExpressionObject [+ tsPropSig "tag" False (Syntax.TypeExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral {+ Syntax.stringLiteralValue = "none",+ Syntax.stringLiteralSingleQuote = False})))])]) (encodeType cx g currentNs v0)+ Core.TypeEither v0 -> Eithers.bind (encodeType cx g currentNs (Core.eitherTypeLeft v0)) (\lt -> Eithers.bind (encodeType cx g currentNs (Core.eitherTypeRight v0)) (\rt ->+ let leftArm =+ Syntax.TypeExpressionObject [+ tsPropSig "tag" False (Syntax.TypeExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral {+ Syntax.stringLiteralValue = "left",+ Syntax.stringLiteralSingleQuote = False}))),+ (tsPropSig "value" False lt)]+ rightArm =+ Syntax.TypeExpressionObject [+ tsPropSig "tag" False (Syntax.TypeExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral {+ Syntax.stringLiteralValue = "right",+ Syntax.stringLiteralSingleQuote = False}))),+ (tsPropSig "value" False rt)]+ in (Right (Syntax.TypeExpressionUnion [+ leftArm,+ rightArm]))))+ Core.TypePair v0 -> Eithers.bind (encodeType cx g currentNs (Core.pairTypeFirst v0)) (\ft -> Eithers.bind (encodeType cx g currentNs (Core.pairTypeSecond v0)) (\st -> Right (tsTuple [+ ft,+ st])))+ Core.TypeFunction v0 -> Eithers.bind (encodeType cx g currentNs (Core.functionTypeDomain v0)) (\dom -> Eithers.bind (encodeType cx g currentNs (Core.functionTypeCodomain v0)) (\cod -> Right (Syntax.TypeExpressionFunction (Syntax.FunctionTypeExpression {+ Syntax.functionTypeExpressionTypeParameters = [],+ Syntax.functionTypeExpressionParameters = [+ dom],+ Syntax.functionTypeExpressionReturnType = cod}))))+ Core.TypeVariable v0 ->+ let lname = Formatting.capitalize (Names.localNameOf v0)+ in (Optionals.cases (Names.moduleNameOf v0) (Right (tsNamedType lname)) (\ns -> Logic.ifElse (Equality.equal (Packaging.unModuleName currentNs) (Packaging.unModuleName ns)) (Right (tsNamedType lname)) (+ let nsSegs = Lists.drop 1 (Strings.splitOn "." (Packaging.unModuleName ns))+ typeAlias = Strings.cat2 "$type_" (Strings.intercalate "_" nsSegs)+ in (Right (tsNamedType (Strings.cat [+ typeAlias,+ ".",+ lname]))))))+ Core.TypeWrap v0 -> encodeType cx g currentNs v0+ Core.TypeRecord v0 -> Eithers.bind (Eithers.mapList (\ft ->+ let fname = Core.unName (Core.fieldTypeName ft)+ ftyp = Core.fieldTypeType ft+ in (Eithers.bind (encodeType cx g currentNs ftyp) (\sftyp -> Right (tsPropSig fname False sftyp)))) v0) (\members -> Right (Syntax.TypeExpressionObject members))+ Core.TypeUnion v0 -> Eithers.bind (Eithers.mapList (\ft ->+ let fname = Core.unName (Core.fieldTypeName ft)+ ftyp = Core.fieldTypeType ft+ in (Eithers.bind (encodeType cx g currentNs ftyp) (\sftyp -> Right (Syntax.TypeExpressionObject [+ tsPropSig "tag" False (Syntax.TypeExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral {+ Syntax.stringLiteralValue = fname,+ Syntax.stringLiteralSingleQuote = False}))),+ (tsPropSig "value" False sftyp)])))) v0) (\arms -> Right (Syntax.TypeExpressionUnion arms))++encodeTypeDefinition :: t0 -> Graph.Graph -> Packaging.ModuleName -> Packaging.TypeDefinition -> Either Errors.Error (Maybe String, Syntax.ModuleItem)+encodeTypeDefinition cx g currentNs tdef =++ let name = Packaging.typeDefinitionName tdef+ typScheme = Packaging.typeDefinitionBody tdef+ rawTyp = Core.typeSchemeBody typScheme+ lname = Formatting.capitalize (Names.localNameOf name)+ in (Eithers.bind (Annotations.getTypeDescription cx g rawTyp) (\mdoc ->+ let forallParams = collectForallParams rawTyp+ typ = stripForalls rawTyp+ typeParams = Lists.map (\v -> tsParam (Formatting.capitalize (Core.unName v))) forallParams+ dtyp = Strip.deannotateType typ+ in case dtyp of+ Core.TypeRecord v0 -> Eithers.bind (Eithers.mapList (\ft ->+ let fname = Core.unName (Core.fieldTypeName ft)+ ftyp = Core.fieldTypeType ft+ in (Eithers.bind (encodeType cx g currentNs ftyp) (\sftyp -> Eithers.bind (Annotations.commentsFromFieldType cx g ft) (\mfdoc -> Right (tsPropSigWithDoc fname False sftyp (mkDocComment mfdoc)))))) v0) (\members -> Right (+ mdoc,+ (Syntax.ModuleItemInterface (Syntax.InterfaceDeclaration {+ Syntax.interfaceDeclarationName = (tsIdent lname),+ Syntax.interfaceDeclarationTypeParameters = typeParams,+ Syntax.interfaceDeclarationExtends = [],+ Syntax.interfaceDeclarationMembers = members}))))+ Core.TypeUnion v0 -> Eithers.bind (Eithers.mapList (\ft ->+ let fname = Core.unName (Core.fieldTypeName ft)+ ftyp = Core.fieldTypeType ft+ dtyp2 = Strip.deannotateType ftyp+ in case dtyp2 of+ Core.TypeUnit -> Right (Syntax.TypeExpressionObject [+ tsPropSig "tag" False (Syntax.TypeExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral {+ Syntax.stringLiteralValue = fname,+ Syntax.stringLiteralSingleQuote = False})))])+ _ -> Eithers.bind (encodeType cx g currentNs ftyp) (\sftyp -> Right (Syntax.TypeExpressionObject [+ tsPropSig "tag" False (Syntax.TypeExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral {+ Syntax.stringLiteralValue = fname,+ Syntax.stringLiteralSingleQuote = False}))),+ (tsPropSig "value" False sftyp)]))) v0) (\arms -> Right (+ mdoc,+ (Syntax.ModuleItemTypeAlias (Syntax.TypeAliasDeclaration {+ Syntax.typeAliasDeclarationName = (tsIdent lname),+ Syntax.typeAliasDeclarationTypeParameters = typeParams,+ Syntax.typeAliasDeclarationType = (Syntax.TypeExpressionUnion arms)}))))+ Core.TypeWrap v0 -> Eithers.bind (encodeType cx g currentNs v0) (\sftyp -> Right (+ mdoc,+ (Syntax.ModuleItemInterface (Syntax.InterfaceDeclaration {+ Syntax.interfaceDeclarationName = (tsIdent lname),+ Syntax.interfaceDeclarationTypeParameters = typeParams,+ Syntax.interfaceDeclarationExtends = [],+ Syntax.interfaceDeclarationMembers = [+ tsPropSig "value" False sftyp]}))))+ _ -> Eithers.bind (encodeType cx g currentNs typ) (\styp -> Right (+ mdoc,+ (Syntax.ModuleItemTypeAlias (Syntax.TypeAliasDeclaration {+ Syntax.typeAliasDeclarationName = (tsIdent lname),+ Syntax.typeAliasDeclarationTypeParameters = typeParams,+ Syntax.typeAliasDeclarationType = styp}))))))++encodeTypeOrAny :: t0 -> t1 -> Packaging.ModuleName -> Core.Type -> Syntax.TypeExpression+encodeTypeOrAny cx g currentNs typ =+ Eithers.either (\_e -> Syntax.TypeExpressionAny) (\te -> te) (encodeType cx g currentNs typ)++filterNonLocalNames :: Packaging.ModuleName -> S.Set Core.Name -> S.Set Core.Name+filterNonLocalNames currentNs names =+ Sets.fromList (Optionals.cat (Lists.map (\n -> Optionals.cases (Names.moduleNameOf n) Nothing (\nameNs -> Logic.ifElse (Equality.equal (Packaging.unModuleName currentNs) (Packaging.unModuleName nameNs)) Nothing (Just n))) (Sets.toList names)))++flattenApplication :: Core.Term -> (Core.Term, [Core.Term])+flattenApplication t =++ let dt = Strip.deannotateTerm t+ in case dt of+ Core.TermApplication v0 ->+ let inner = flattenApplication (Core.applicationFunction v0)+ head_ = Pairs.first inner+ prevArgs = Pairs.second inner+ in (head_, (Lists.concat2 prevArgs (Lists.singleton (Core.applicationArgument v0))))+ _ -> (t, [])++functionDeclarationFromTerm :: Typing.InferenceContext -> Graph.Graph -> Packaging.ModuleName -> String -> Core.Term -> Maybe Core.Type -> Syntax.FunctionDeclaration+functionDeclarationFromTerm cx g currentNs lname term _mScheme =++ let fsE = analyzeTypeScriptFunction cx g term+ fs =+ Eithers.either (\_err -> Typing.FunctionStructure {+ Typing.functionStructureTypeParams = [],+ Typing.functionStructureParams = [],+ Typing.functionStructureBindings = [],+ Typing.functionStructureBody = term,+ Typing.functionStructureDomains = [],+ Typing.functionStructureCodomain = Nothing,+ Typing.functionStructureEnvironment = g}) (\ok -> ok) fsE+ fsParams = Typing.functionStructureParams fs+ fsDoms = Typing.functionStructureDomains fs+ fsBindings = Typing.functionStructureBindings fs+ fsBody = Typing.functionStructureBody fs+ fsEnv = Typing.functionStructureEnvironment fs+ domPad = Core.TypeVariable (Core.Name "_")+ fsDomsPadded = Lists.concat2 fsDoms (Lists.replicate (Math.sub (Lists.length fsParams) (Lists.length fsDoms)) domPad)+ paramPatterns =+ Lists.map (\pair -> encodeParam cx fsEnv currentNs (Pairs.first pair) (Pairs.second pair)) (Lists.zip fsParams fsDomsPadded)+ sortedBindings = sortBindingsTopologically fsBindings+ bindingStmts = Lists.map (\b -> encodeBindingAsStatement cx fsEnv currentNs b) sortedBindings+ bodyExpr = encodeTerm cx fsEnv currentNs fsBody+ returnStmt = Syntax.StatementReturn (Just bodyExpr)+ block = Lists.concat2 bindingStmts [+ returnStmt]+ in Syntax.FunctionDeclaration {+ Syntax.functionDeclarationId = (tsIdent lname),+ Syntax.functionDeclarationParams = paramPatterns,+ Syntax.functionDeclarationBody = block,+ Syntax.functionDeclarationAsync = False,+ Syntax.functionDeclarationGenerator = False}++importsToText :: String -> Packaging.ModuleName -> S.Set Core.Name -> String+importsToText kind currentNs names =++ let pairs =+ Optionals.cat (Lists.map (\n -> Optionals.cases (Names.moduleNameOf n) Nothing (\ns -> Logic.ifElse (Equality.equal (Packaging.unModuleName currentNs) (Packaging.unModuleName ns)) Nothing (Just (ns, n)))) (Sets.toList names))+ transformLocal =+ \s -> Logic.ifElse (Equality.equal kind "type") (Formatting.capitalize s) (Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords s)+ importKeyword = Logic.ifElse (Equality.equal kind "type") "import type" "import"+ grouped =+ Lists.foldl (\acc -> \p ->+ let ns = Pairs.first p+ n = Pairs.second p+ local = transformLocal (Names.localNameOf n)+ existing = Optionals.fromOptional [] (Maps.lookup ns acc)+ in (Maps.insert ns (Lists.cons local existing) acc)) Maps.empty pairs+ currentSegs = Lists.drop 1 (Strings.splitOn "." (Packaging.unModuleName currentNs))+ currentDepth = Lists.length currentSegs+ currentIsTest =+ Logic.and (Logic.not (Lists.null currentSegs)) (Equality.equal (Optionals.fromOptional "" (Lists.maybeHead currentSegs)) "test")+ baseUpPrefix = Logic.ifElse (Equality.equal currentDepth 1) "./" (Strings.cat (Lists.replicate (Math.sub currentDepth 1) "../"))+ lines =+ Lists.map (\entry ->+ let ns = Pairs.first entry+ locals = Pairs.second entry+ targetSegs = Lists.drop 1 (Strings.splitOn "." (Packaging.unModuleName ns))+ targetIsTest =+ Logic.and (Logic.not (Lists.null targetSegs)) (Equality.equal (Optionals.fromOptional "" (Lists.maybeHead targetSegs)) "test")+ targetPathSegs =+ Logic.ifElse (Equality.equal (Optionals.fromOptional "" (Lists.maybeHead targetSegs)) "lib") (Lists.concat2 [+ "overlay",+ "typescript"] targetSegs) targetSegs+ targetPath = Strings.intercalate "/" targetPathSegs+ upPrefix =+ Logic.ifElse (Logic.and currentIsTest (Logic.not targetIsTest)) (Strings.cat2 baseUpPrefix "../../../main/typescript/hydra/") baseUpPrefix+ nsSlug = Strings.intercalate "_" targetSegs+ moduleAlias = Logic.ifElse (Equality.equal kind "type") (Strings.cat2 "$type_" nsSlug) (Strings.cat2 "$mod_" nsSlug)+ in (Strings.cat [+ importKeyword,+ " * as ",+ moduleAlias,+ " from \"",+ upPrefix,+ targetPath,+ ".js\";\n"])) (Maps.toList grouped)+ in (Strings.cat lines)++lazyFlagsForPrimitive :: Graph.Graph -> Core.Name -> [Bool]+lazyFlagsForPrimitive g name =+ Optionals.cases (Maps.lookup name (Graph.graphPrimitives g)) [] (\prim -> Lists.map (\p -> Typing.parameterIsLazy p) (Typing.termSignatureParameters (Packaging.primitiveDefinitionSignature (Graph.primitiveDefinition prim))))++mkDocComment :: Maybe String -> Maybe Syntax.DocumentationComment+mkDocComment mdesc =+ Optionals.cases mdesc Nothing (\d -> Logic.ifElse (Equality.equal d "") Nothing (Just (Syntax.DocumentationComment {+ Syntax.documentationCommentDescription = (ShowDocs.renderDocStringWith tsDocEntityRef d),+ Syntax.documentationCommentTags = []})))++moduleToTypeScript :: Packaging.Module -> [Packaging.Definition] -> Typing.InferenceContext -> Graph.Graph -> Either Errors.Error (M.Map String String)+moduleToTypeScript mod defs cx g =++ let currentNs = Packaging.moduleName mod+ partitioned = Environment.partitionDefinitions defs+ typeDefs = Pairs.first partitioned+ rawTermDefs = Pairs.second partitioned+ termDefs = sortTermDefsTopologically currentNs rawTermDefs+ typeImportsFromTypes =+ Lists.foldl (\acc -> \td -> Sets.union acc (collectImports currentNs (Core.typeSchemeBody (Packaging.typeDefinitionBody td)))) Sets.empty typeDefs+ typeImportsFromTerms =+ Lists.foldl (\acc -> \td -> Optionals.cases (Packaging.termDefinitionSignature td) acc (\sig -> Sets.union acc (collectImports currentNs (Core.typeSchemeBody (Scoping.termSignatureToTypeScheme sig))))) Sets.empty termDefs+ typeImportsFromInner =+ Lists.foldl (\acc -> \td -> Sets.union acc (collectInnerTypeImports currentNs (Packaging.termDefinitionBody td))) Sets.empty termDefs+ typeImports = Sets.union (Sets.union typeImportsFromTypes typeImportsFromTerms) typeImportsFromInner+ termImports =+ Lists.foldl (\acc -> \td -> Sets.union acc (collectTermImports currentNs (Packaging.termDefinitionBody td))) Sets.empty termDefs+ typeImportsBlock = importsToText "type" currentNs typeImports+ termImportsBlock = importsToText "value" currentNs termImports+ importsBlock = Strings.cat2 typeImportsBlock termImportsBlock+ in (Eithers.bind (Eithers.mapList (encodeTypeDefinition cx g currentNs) typeDefs) (\typeItems ->+ let termItems = Lists.map (encodeTermDefinition cx g currentNs) termDefs+ allItems = Lists.concat2 typeItems termItems+ mModuleDoc = Optionals.bind (Packaging.moduleMetadata mod) (\em -> Packaging.entityMetadataDescription em)+ moduleDocText = Optionals.cases mModuleDoc "" (\d -> Strings.cat2 (Serde.toTypeScriptComments d []) "\n\n")+ header = Strings.cat2 "// Note: this is an automatically generated file. Do not edit.\n\n" moduleDocText+ renderItem =+ \docAndItem ->+ let mdoc = Pairs.first docAndItem+ item = Pairs.second docAndItem+ itemText = printModuleItem item+ in (Optionals.cases mdoc itemText (\d -> Strings.cat [+ Serde.toTypeScriptComments d [],+ "\n",+ itemText]))+ body = Strings.intercalate "\n\n" (Lists.map renderItem allItems)+ filePath = Names.moduleNameToFilePath Util.CaseConventionCamel (File.FileExtension "ts") (Packaging.moduleName mod)+ in (Right (Maps.singleton filePath (Strings.cat [+ header,+ importsBlock,+ (Logic.ifElse (Equality.equal importsBlock "") "" "\n"),+ body,+ (Logic.ifElse (Equality.equal body "") "" "\n")])))))++printInterfaceDeclaration :: Syntax.InterfaceDeclaration -> String+printInterfaceDeclaration decl =++ let name = Syntax.unIdentifier (Syntax.interfaceDeclarationName decl)+ params = printTypeParameterList (Syntax.interfaceDeclarationTypeParameters decl)+ exts = Syntax.interfaceDeclarationExtends decl+ extClause =+ Logic.ifElse (Lists.null exts) "" (Strings.cat2 " extends " (Strings.intercalate ", " (Lists.map printTypeExpression exts)))+ members = Syntax.interfaceDeclarationMembers decl+ renderMember = \ps -> Strings.intercalate "\n " (Strings.lines (printPropertySignature ps))+ body =+ Logic.ifElse (Lists.null members) "" (Strings.cat [+ "\n ",+ (Strings.intercalate ";\n " (Lists.map renderMember members)),+ ";\n"])+ in (Strings.cat [+ "export interface ",+ name,+ params,+ extClause,+ " {",+ body,+ "}\n"])++printLiteral :: Syntax.Literal -> String+printLiteral lit =+ case lit of+ Syntax.LiteralString v0 -> tsEscapeString (Syntax.stringLiteralValue v0)+ Syntax.LiteralBoolean v0 -> Logic.ifElse v0 "true" "false"+ Syntax.LiteralNull -> "null"+ Syntax.LiteralUndefined -> "undefined"+ _ -> "null"++printModuleItem :: Syntax.ModuleItem -> String+printModuleItem mi =+ case mi of+ Syntax.ModuleItemInterface v0 -> printInterfaceDeclaration v0+ Syntax.ModuleItemTypeAlias v0 -> printTypeAliasDeclaration v0+ Syntax.ModuleItemStatement _ -> Serialization.printExpr (Serde.moduleItemToExpr mi)+ Syntax.ModuleItemImport _ -> Serialization.printExpr (Serde.moduleItemToExpr mi)+ Syntax.ModuleItemExport _ -> Serialization.printExpr (Serde.moduleItemToExpr mi)+ _ -> ""++printPropertySignature :: Syntax.PropertySignature -> String+printPropertySignature ps =++ let mcomments = Syntax.propertySignatureComments ps+ line =+ Strings.cat [+ Logic.ifElse (Syntax.propertySignatureReadonly ps) "readonly " "",+ (Syntax.unIdentifier (Syntax.propertySignatureName ps)),+ (Logic.ifElse (Syntax.propertySignatureOptional ps) "?" ""),+ ": ",+ (printTypeExpression (Syntax.propertySignatureType ps))]+ in (Optionals.cases mcomments line (\dc -> Strings.cat [+ Serde.toTypeScriptComments (Syntax.documentationCommentDescription dc) (Syntax.documentationCommentTags dc),+ "\n",+ line]))++printTypeAliasDeclaration :: Syntax.TypeAliasDeclaration -> String+printTypeAliasDeclaration decl =++ let name = Syntax.unIdentifier (Syntax.typeAliasDeclarationName decl)+ params = printTypeParameterList (Syntax.typeAliasDeclarationTypeParameters decl)+ rhs = printTypeExpression (Syntax.typeAliasDeclarationType decl)+ in (Strings.cat [+ "export type ",+ name,+ params,+ " = ",+ rhs,+ ";\n"])++printTypeExpression :: Syntax.TypeExpression -> String+printTypeExpression t =+ case t of+ Syntax.TypeExpressionIdentifier v0 -> Syntax.unIdentifier v0+ Syntax.TypeExpressionLiteral v0 -> printLiteral v0+ Syntax.TypeExpressionArray v0 -> Strings.cat [+ "ReadonlyArray<",+ (printTypeExpression (Syntax.unArrayTypeExpression v0)),+ ">"]+ Syntax.TypeExpressionTuple v0 -> Strings.cat [+ "readonly [",+ (Strings.intercalate ", " (Lists.map printTypeExpression v0)),+ "]"]+ Syntax.TypeExpressionUnion v0 -> Strings.intercalate " | " (Lists.map printTypeExpression v0)+ Syntax.TypeExpressionIntersection v0 -> Strings.intercalate " & " (Lists.map printTypeExpression v0)+ Syntax.TypeExpressionParameterized v0 -> Strings.cat [+ printTypeExpression (Syntax.parameterizedTypeExpressionBase v0),+ "<",+ (Strings.intercalate ", " (Lists.map printTypeExpression (Syntax.parameterizedTypeExpressionArguments v0))),+ ">"]+ Syntax.TypeExpressionOptional v0 -> Strings.cat [+ printTypeExpression v0,+ " | undefined"]+ Syntax.TypeExpressionReadonly v0 -> Strings.cat2 "readonly " (printTypeExpression v0)+ Syntax.TypeExpressionObject v0 -> Strings.cat [+ "{ ",+ (Strings.intercalate "; " (Lists.map printPropertySignature v0)),+ " }"]+ Syntax.TypeExpressionFunction _ -> "((...args: any[]) => any)"+ Syntax.TypeExpressionAny -> "any"+ Syntax.TypeExpressionUnknown -> "unknown"+ Syntax.TypeExpressionVoid -> "void"+ Syntax.TypeExpressionNever -> "never"+ _ -> "unknown"++printTypeParameter :: Syntax.TypeParameter -> String+printTypeParameter tp =++ let name = Syntax.unIdentifier (Syntax.typeParameterName tp)+ constraint = Syntax.typeParameterConstraint tp+ in (Optionals.cases constraint name (\c -> Strings.cat [+ name,+ " extends ",+ (printTypeExpression c)]))++printTypeParameterList :: [Syntax.TypeParameter] -> String+printTypeParameterList tps =+ Logic.ifElse (Lists.null tps) "" (Strings.cat [+ "<",+ (Strings.intercalate ", " (Lists.map printTypeParameter tps)),+ ">"])++sanitizeParamName :: Core.Name -> String+sanitizeParamName n = Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords (Names.localNameOf n)++sortBindingsTopologically :: [Core.Binding] -> [Core.Binding]+sortBindingsTopologically bindings =++ let byName = Maps.fromList (Lists.map (\b -> (Core.bindingName b, b)) bindings)+ adjacency =+ Lists.map (\b ->+ let bname = Core.bindingName b+ bterm = Core.bindingTerm b+ freeVars = Variables.freeVariablesInTerm bterm+ deps = Lists.filter (\n -> Maps.member n byName) (Sets.toList freeVars)+ in (bname, deps)) bindings+ sccs = Sorting.topologicalSortComponents adjacency+ in (Optionals.cat (Lists.map (\n -> Maps.lookup n byName) (Lists.concat sccs)))++sortTermDefsTopologically :: t0 -> [Packaging.TermDefinition] -> [Packaging.TermDefinition]+sortTermDefsTopologically currentNs tdefs =++ let byName = Maps.fromList (Lists.map (\td -> (Packaging.termDefinitionName td, td)) tdefs)+ adjacency =+ Lists.map (\td ->+ let tname = Packaging.termDefinitionName td+ tterm = Packaging.termDefinitionBody td+ freeVars = Variables.freeVariablesInTerm tterm+ deps = Lists.filter (\n -> Maps.member n byName) (Sets.toList freeVars)+ in (tname, deps)) tdefs+ sccs = Sorting.topologicalSortComponents adjacency+ in (Optionals.cat (Lists.map (\n -> Maps.lookup n byName) (Lists.concat sccs)))++stripForalls :: Core.Type -> Core.Type+stripForalls t =++ let dt = Strip.deannotateType t+ in case dt of+ Core.TypeForall v0 -> stripForalls (Core.forallTypeBody v0)+ _ -> dt++termHeadVariable :: Core.Term -> Maybe Core.Name+termHeadVariable t =++ let dt = Strip.deannotateTerm t+ in case dt of+ Core.TermVariable v0 -> Just v0+ Core.TermTypeApplication v0 -> termHeadVariable (Core.typeApplicationTermBody v0)+ _ -> Nothing++tsArray :: [Syntax.Expression] -> Syntax.Expression+tsArray elems = Syntax.ExpressionArray (Lists.map (\e -> Syntax.ArrayElementExpression e) elems)++tsArrow :: [String] -> Syntax.Expression -> Syntax.Expression+tsArrow params body =+ Syntax.ExpressionArrow (Syntax.ArrowFunctionExpression {+ Syntax.arrowFunctionExpressionParams = (Lists.map (\p -> Syntax.PatternIdentifier (tsIdent p)) params),+ Syntax.arrowFunctionExpressionBody = (Syntax.ArrowFunctionBodyExpression body),+ Syntax.arrowFunctionExpressionAsync = False})++tsArrowTyped :: [Syntax.Pattern] -> Syntax.Expression -> Syntax.Expression+tsArrowTyped patterns body =+ Syntax.ExpressionArrow (Syntax.ArrowFunctionExpression {+ Syntax.arrowFunctionExpressionParams = patterns,+ Syntax.arrowFunctionExpressionBody = (Syntax.ArrowFunctionBodyExpression body),+ Syntax.arrowFunctionExpressionAsync = False})++tsAsAny :: Syntax.Expression -> Syntax.Expression+tsAsAny e =+ Syntax.ExpressionAsExpression (Syntax.AsExpression {+ Syntax.asExpressionExpression = e,+ Syntax.asExpressionType = Syntax.TypeExpressionAny})++tsCall :: Syntax.Expression -> [Syntax.Expression] -> Syntax.Expression+tsCall callee args =+ Syntax.ExpressionCall (Syntax.CallExpression {+ Syntax.callExpressionCallee = callee,+ Syntax.callExpressionArguments = args,+ Syntax.callExpressionOptional = False})++tsCond :: Syntax.Expression -> Syntax.Expression -> Syntax.Expression -> Syntax.Expression+tsCond test cons alt =+ Syntax.ExpressionConditional (Syntax.ConditionalExpression {+ Syntax.conditionalExpressionTest = test,+ Syntax.conditionalExpressionConsequent = cons,+ Syntax.conditionalExpressionAlternate = alt})++-- | Render a 'EntityReference' as TSDoc link syntax+tsDocEntityRef :: Packaging.EntityReference -> String+tsDocEntityRef x =+ case x of+ Packaging.EntityReferenceDefinition v0 -> Strings.cat2 "{@link " (Strings.cat2 (case v0 of+ Packaging.DefinitionReferencePrimitive v1 -> Names.localNameOf v1+ Packaging.DefinitionReferenceTerm v1 -> Names.localNameOf v1+ Packaging.DefinitionReferenceType v1 -> Names.localNameOf v1) "}")+ Packaging.EntityReferenceModule v0 -> Packaging.unModuleName v0+ Packaging.EntityReferencePackage v0 -> Packaging.unPackageName v0+ Packaging.EntityReferenceTermExpr v0 -> Strings.cat2 "`" (Strings.cat2 v0 "`")+ Packaging.EntityReferenceTypeExpr v0 -> Strings.cat2 "`" (Strings.cat2 v0 "`")++tsEnvGetGraph :: t0 -> t0+tsEnvGetGraph g = g++tsEnvSetGraph :: t0 -> t1 -> t0+tsEnvSetGraph newG _old = newG++tsEscapeString :: String -> String+tsEscapeString s =++ let escapeChar =+ \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" (Strings.fromList (Lists.pure c))))))))+ in (Strings.cat [+ "\"",+ (Strings.cat (Lists.map escapeChar (Strings.toList s))),+ "\""])++tsExprIdent :: String -> Syntax.Expression+tsExprIdent s = Syntax.ExpressionIdentifier (tsIdent s)++tsExprStr :: String -> Syntax.Expression+tsExprStr s =+ Syntax.ExpressionLiteral (Syntax.LiteralString (Syntax.StringLiteral {+ Syntax.stringLiteralValue = s,+ Syntax.stringLiteralSingleQuote = False}))++tsIdent :: String -> Syntax.Identifier+tsIdent s = Syntax.Identifier s++tsMember :: Syntax.Expression -> String -> Syntax.Expression+tsMember obj prop =+ Syntax.ExpressionMember (Syntax.MemberExpression {+ Syntax.memberExpressionObject = obj,+ Syntax.memberExpressionProperty = (tsExprIdent prop),+ Syntax.memberExpressionComputed = False,+ Syntax.memberExpressionOptional = False})++tsNamedType :: String -> Syntax.TypeExpression+tsNamedType n = Syntax.TypeExpressionIdentifier (tsIdent n)++tsNew :: Syntax.Expression -> [Syntax.Expression] -> Syntax.Expression+tsNew callee args =+ Syntax.ExpressionNew (Syntax.CallExpression {+ Syntax.callExpressionCallee = callee,+ Syntax.callExpressionArguments = args,+ Syntax.callExpressionOptional = False})++tsObject :: [(String, Syntax.Expression)] -> Syntax.Expression+tsObject props =+ Syntax.ExpressionObject (Lists.map (\kv ->+ let k = Pairs.first kv+ v = Pairs.second kv+ in Syntax.Property {+ Syntax.propertyKey = (tsExprIdent k),+ Syntax.propertyValue = v,+ Syntax.propertyKind = Syntax.PropertyKindInit,+ Syntax.propertyComputed = False,+ Syntax.propertyShorthand = False}) props)++tsParam :: String -> Syntax.TypeParameter+tsParam n =+ Syntax.TypeParameter {+ Syntax.typeParameterName = (tsIdent n),+ Syntax.typeParameterConstraint = Nothing,+ Syntax.typeParameterDefault = Nothing}++tsParamApp1 :: String -> Syntax.TypeExpression -> Syntax.TypeExpression+tsParamApp1 n arg =+ Syntax.TypeExpressionParameterized (Syntax.ParameterizedTypeExpression {+ Syntax.parameterizedTypeExpressionBase = (tsNamedType n),+ Syntax.parameterizedTypeExpressionArguments = [+ arg]})++tsParamApp2 :: String -> Syntax.TypeExpression -> Syntax.TypeExpression -> Syntax.TypeExpression+tsParamApp2 n a b =+ Syntax.TypeExpressionParameterized (Syntax.ParameterizedTypeExpression {+ Syntax.parameterizedTypeExpressionBase = (tsNamedType n),+ Syntax.parameterizedTypeExpressionArguments = [+ a,+ b]})++tsParen :: Syntax.Expression -> Syntax.Expression+tsParen e = Syntax.ExpressionParenthesized e++tsPropSig :: String -> Bool -> Syntax.TypeExpression -> Syntax.PropertySignature+tsPropSig name optional typ = tsPropSigWithDoc name optional typ Nothing++tsPropSigWithDoc :: String -> Bool -> Syntax.TypeExpression -> Maybe Syntax.DocumentationComment -> Syntax.PropertySignature+tsPropSigWithDoc name optional typ mcomments =++ let safe = Formatting.sanitizeWithUnderscores Language.typeScriptReservedWords name+ in Syntax.PropertySignature {+ Syntax.propertySignatureName = (tsIdent safe),+ Syntax.propertySignatureType = typ,+ Syntax.propertySignatureOptional = optional,+ Syntax.propertySignatureReadonly = True,+ Syntax.propertySignatureComments = mcomments}++tsReadonlyMap :: Syntax.TypeExpression -> Syntax.TypeExpression -> Syntax.TypeExpression+tsReadonlyMap k v = tsParamApp2 "ReadonlyMap" k v++tsReadonlySet :: Syntax.TypeExpression -> Syntax.TypeExpression+tsReadonlySet t = tsParamApp1 "ReadonlySet" t++tsTuple :: [Syntax.TypeExpression] -> Syntax.TypeExpression+tsTuple ts = Syntax.TypeExpressionTuple ts++tsTypedIdent :: String -> Syntax.TypeExpression -> Syntax.Pattern+tsTypedIdent name typ =+ Syntax.PatternTyped (Syntax.TypedPattern {+ Syntax.typedPatternPattern = (Syntax.PatternIdentifier (tsIdent name)),+ Syntax.typedPatternType = typ})++tsUndefined :: Syntax.Expression+tsUndefined = tsExprIdent "undefined"
+ src/main/haskell/Hydra/TypeScript/Language.hs view
@@ -0,0 +1,298 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Language constraints and reserved words for TypeScript 5.x (ECMAScript 2024 base)++module Hydra.TypeScript.Language where++import qualified Hydra.Ast as Ast+import qualified Hydra.Coders as Coders+import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs+import qualified Hydra.Error.Checking as Checking+import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile+import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem+import qualified Hydra.Errors as Errors+import qualified Hydra.File as File+import qualified Hydra.Graph as Graph+import qualified Hydra.Json.Model as Model+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets+import qualified Hydra.Packaging as Packaging+import qualified Hydra.Parsing as Parsing+import qualified Hydra.Paths as Paths+import qualified Hydra.Query as Query+import qualified Hydra.Relational as Relational+import qualified Hydra.System as System+import qualified Hydra.Tabular as Tabular+import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time+import qualified Hydra.Topology as Topology+import qualified Hydra.Typed as Typed+import qualified Hydra.Typing as Typing+import qualified Hydra.Util as Util+import qualified Hydra.Validation as Validation+import qualified Hydra.Variants as Variants+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci+import qualified Data.Set as S++-- | Language constraints for TypeScript 5.x+typeScriptLanguage :: Coders.Language+typeScriptLanguage =+ Coders.Language {+ Coders.languageName = (Coders.LanguageName "hydra.typeScript"),+ Coders.languageConstraints = Coders.LanguageConstraints {+ Coders.languageConstraintsLiteralVariants = literalVariants,+ Coders.languageConstraintsFloatTypes = floatTypes,+ Coders.languageConstraintsIntegerTypes = integerTypes,+ Coders.languageConstraintsTermVariants = termVariants,+ Coders.languageConstraintsTypeVariants = typeVariants,+ Coders.languageConstraintsTypes = typePredicate},+ Coders.languageSupportedFeatures = (Sets.fromList [+ Coders.LanguageFeatureNestedPolymorphicLetBindings]),+ Coders.languageCaseConventions = Coders.CaseConventions {+ Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,+ Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,+ Coders.caseConventionsEnumValue = Util.CaseConventionPascal,+ Coders.caseConventionsField = Util.CaseConventionCamel,+ Coders.caseConventionsFile = Util.CaseConventionLowerSnake,+ Coders.caseConventionsModule = Util.CaseConventionLowerSnake,+ Coders.caseConventionsTerm = Util.CaseConventionCamel,+ Coders.caseConventionsTermVariable = Util.CaseConventionCamel,+ Coders.caseConventionsType = Util.CaseConventionPascal,+ Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},+ Coders.languageDefaultFileExtension = (File.FileExtension "ts")}+ where+ literalVariants =+ Sets.fromList [+ Variants.LiteralVariantBinary,+ Variants.LiteralVariantBoolean,+ Variants.LiteralVariantFloat,+ Variants.LiteralVariantInteger,+ Variants.LiteralVariantString]+ floatTypes = Sets.fromList [+ Core.FloatTypeFloat64]+ 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.TermVariantOptional,+ 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.TypeVariantOptional,+ Variants.TypeVariantPair,+ Variants.TypeVariantRecord,+ Variants.TypeVariantSet,+ Variants.TypeVariantUnion,+ Variants.TypeVariantUnit,+ Variants.TypeVariantVariable,+ Variants.TypeVariantVoid,+ Variants.TypeVariantWrap]+ typePredicate = \_ -> True++-- | A set of reserved words in TypeScript+typeScriptReservedWords :: S.Set String+typeScriptReservedWords =+ Sets.fromList (Lists.concat [+ keywords,+ futureReserved,+ strictModeReserved,+ typeScriptKeywords,+ builtIns,+ hydraTypeScriptKeywords])+ 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",+ "static",+ "yield"]+ typeScriptKeywords =+ [+ "abstract",+ "as",+ "asserts",+ "assert",+ "any",+ "boolean",+ "constructor",+ "declare",+ "from",+ "get",+ "global",+ "infer",+ "intrinsic",+ "is",+ "keyof",+ "module",+ "namespace",+ "never",+ "object",+ "of",+ "out",+ "override",+ "readonly",+ "require",+ "satisfies",+ "set",+ "string",+ "symbol",+ "type",+ "unique",+ "unknown",+ "using"]+ 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"]+ hydraTypeScriptKeywords =+ [+ "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"]
+ src/main/haskell/Hydra/TypeScript/Operators.hs view
@@ -0,0 +1,194 @@+-- Note: this is an automatically generated file. Do not edit.++-- | AST operators for TypeScript with precedence and associativity++module Hydra.TypeScript.Operators where++import qualified Hydra.Ast as Ast+import qualified Hydra.Coders as Coders+import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs+import qualified Hydra.Error.Checking as Checking+import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile+import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem+import qualified Hydra.Errors as Errors+import qualified Hydra.File as File+import qualified Hydra.Graph as Graph+import qualified Hydra.Json.Model as Model+import qualified Hydra.Packaging as Packaging+import qualified Hydra.Parsing as Parsing+import qualified Hydra.Paths as Paths+import qualified Hydra.Query as Query+import qualified Hydra.Relational as Relational+import qualified Hydra.Serialization as Serialization+import qualified Hydra.System as System+import qualified Hydra.Tabular as Tabular+import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time+import qualified Hydra.Topology as Topology+import qualified Hydra.Typed as Typed+import qualified Hydra.Typing as Typing+import qualified Hydra.Util as Util+import qualified Hydra.Validation as Validation+import qualified Hydra.Variants as Variants+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci++-- | 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
+ src/main/haskell/Hydra/TypeScript/Serde.hs view
@@ -0,0 +1,1075 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Serialization functions for converting TypeScript AST to abstract expressions++module Hydra.TypeScript.Serde where++import qualified Hydra.Ast as Ast+import qualified Hydra.Coders as Coders+import qualified Hydra.Constants as Constants+import qualified Hydra.Core as Core+import qualified Hydra.Docs as Docs+import qualified Hydra.Error.Checking as Checking+import qualified Hydra.Error.Core as ErrorCore+import qualified Hydra.Error.File as ErrorFile+import qualified Hydra.Error.Packaging as ErrorPackaging+import qualified Hydra.Error.System as ErrorSystem+import qualified Hydra.Errors as Errors+import qualified Hydra.File as File+import qualified Hydra.Graph as Graph+import qualified Hydra.Json.Model as Model+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists+import qualified Hydra.Overlay.Haskell.Lib.Literals as Literals+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic+import qualified Hydra.Overlay.Haskell.Lib.Math as Math+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings+import qualified Hydra.Packaging as Packaging+import qualified Hydra.Parsing as Parsing+import qualified Hydra.Paths as Paths+import qualified Hydra.Query as Query+import qualified Hydra.Relational as Relational+import qualified Hydra.Serialization as Serialization+import qualified Hydra.System as System+import qualified Hydra.Tabular as Tabular+import qualified Hydra.Testing as Testing+import qualified Hydra.Time as Time+import qualified Hydra.Topology as Topology+import qualified Hydra.TypeScript.Operators as Operators+import qualified Hydra.TypeScript.Syntax as Syntax+import qualified Hydra.Typed as Typed+import qualified Hydra.Typing as Typing+import qualified Hydra.Util as Util+import qualified Hydra.Validation as Validation+import qualified Hydra.Variants as Variants+import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.Scientific as Sci++allDigits :: [Int] -> Bool+allDigits cps =+ Logic.and (Equality.gt (Lists.length cps) 0) (Lists.foldl (\acc -> \c -> Logic.and acc (Logic.and (Equality.gte c 48) (Equality.lte c 57))) True cps)++-- | 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 -> Optionals.cases maybeP (Serialization.cst "") patternToExpr) 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 = Serialization.parenListAdaptive (Lists.map patternToExpr params)+ bodyExpr =+ case body of+ Syntax.ArrowFunctionBodyExpression v0 -> case v0 of+ Syntax.ExpressionObject _ -> Serialization.parens (expressionToExpr v0)+ Syntax.ExpressionSequence _ -> Serialization.parens (expressionToExpr 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. Renders as `{ stmt1\n stmt2\n ... }` using curlyBlock + newlineSep: statements are separated by newlines, NOT by commas (which curlyBracesList's default would insert and which TypeScript rejects between block statements).+blockStatementToExpr :: [Syntax.Statement] -> Ast.Expr+blockStatementToExpr block =+ Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.newlineSep (Lists.map statementToExpr block))++-- | Convert a break statement to an AST expression+breakStatementToExpr :: Maybe Syntax.Identifier -> Ast.Expr+breakStatementToExpr b =+ Optionals.cases b (Serialization.cst "break;") (\label -> Serialization.suffix ";" (Serialization.spaceSep [+ Serialization.cst "break",+ (identifierToExpr label)]))++-- | 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 =+ case callee of+ Syntax.ExpressionArrow _ -> Serialization.parens (expressionToExpr callee)+ Syntax.ExpressionConditional _ -> Serialization.parens (expressionToExpr callee)+ Syntax.ExpressionBinary _ -> Serialization.parens (expressionToExpr callee)+ Syntax.ExpressionUnary _ -> Serialization.parens (expressionToExpr callee)+ Syntax.ExpressionAssignment _ -> Serialization.parens (expressionToExpr callee)+ Syntax.ExpressionSequence _ -> Serialization.parens (expressionToExpr callee)+ Syntax.ExpressionObject _ -> Serialization.parens (expressionToExpr callee)+ Syntax.ExpressionFunction _ -> Serialization.parens (expressionToExpr callee)+ _ -> expressionToExpr callee+ argsExpr = Serialization.parenListAdaptive (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 =+ Optionals.cases param (Serialization.cst "catch") (\p -> Serialization.spaceSep [+ Serialization.cst "catch",+ (Serialization.parens (patternToExpr p))])+ 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 =+ Optionals.cases superClass [] (\s -> [+ Serialization.cst "extends",+ (expressionToExpr s)])+ bodyExpr =+ Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.newlineSep (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 (Optionals.cases mc (classDeclarationToExpr body) (\c -> Serialization.newlineSep [+ documentationCommentToExpr c,+ (classDeclarationToExpr body)]))++-- | 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+ consExpr =+ case consequent of+ Syntax.ExpressionObject _ -> Serialization.parens (expressionToExpr consequent)+ Syntax.ExpressionSequence _ -> Serialization.parens (expressionToExpr consequent)+ _ -> expressionToExpr consequent+ altExpr =+ case alternate of+ Syntax.ExpressionObject _ -> Serialization.parens (expressionToExpr alternate)+ Syntax.ExpressionSequence _ -> Serialization.parens (expressionToExpr alternate)+ _ -> expressionToExpr alternate+ in (Serialization.spaceSep [+ expressionToExpr test,+ (Serialization.cst "?"),+ consExpr,+ (Serialization.cst ":"),+ altExpr])++-- | Convert a continue statement to an AST expression+continueStatementToExpr :: Maybe Syntax.Identifier -> Ast.Expr+continueStatementToExpr c =+ Optionals.cases c (Serialization.cst "continue;") (\label -> Serialization.suffix ";" (Serialization.spaceSep [+ Serialization.cst "continue",+ (identifierToExpr label)]))++-- | 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.parens (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 (toTypeScriptComments description tags))++-- | 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.+documentationTagToLine :: Syntax.DocumentationTag -> String+documentationTagToLine tag =++ let name = Syntax.documentationTagName tag+ mtype = Syntax.documentationTagType tag+ mparamName = Syntax.documentationTagParamName tag+ description = Syntax.documentationTagDescription tag+ typePart =+ Optionals.cases mtype "" (\t -> Strings.cat [+ "{",+ (typeExpressionToString t),+ "}"])+ paramPart = Optionals.cases mparamName "" (\p -> Syntax.unIdentifier p)+ parts =+ [+ Strings.cat2 "@" name,+ typePart,+ paramPart,+ description]+ nonEmpty = Lists.filter (\p -> Logic.not (Equality.equal p "")) parts+ in (Strings.cat2 " * " (Strings.intercalate " " nonEmpty))++-- | Escape special characters in a string for TypeScript+escapeString :: String -> Bool -> String+escapeString s singleQuote =++ let replace = \old -> \new_ -> \str -> Strings.intercalate new_ (Strings.splitOn old str)+ s1 = replace "\\" "\\\\" s+ s2 = replace "\n" "\\n" s1+ s3 = replace "\r" "\\r" s2+ s4 = replace "\t" "\\t" s3+ in (Logic.ifElse singleQuote (replace "'" "\\'" s4) (replace "\"" "\\\"" s4))++-- | 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 =+ Optionals.cases exported (Serialization.cst "*") (\e -> Serialization.spaceSep [+ Serialization.cst "*",+ (Serialization.cst "as"),+ (identifierToExpr e)])+ 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 TypeScript 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.parenListAdaptive (Lists.map expressionToExpr v0)+ Syntax.ExpressionThis -> Serialization.cst "this"+ Syntax.ExpressionNew v0 -> Serialization.spaceSep [+ Serialization.cst "new",+ (callExpressionToExpr v0)]+ Syntax.ExpressionYield v0 -> Optionals.cases v0 (Serialization.cst "yield") (\e -> Serialization.spaceSep [+ Serialization.cst "yield",+ (expressionToExpr e)])+ Syntax.ExpressionAwait v0 -> Serialization.spaceSep [+ Serialization.cst "await",+ (expressionToExpr v0)]+ Syntax.ExpressionSpread v0 -> Serialization.prefix "..." (expressionToExpr (Syntax.unSpreadElement v0))+ Syntax.ExpressionParenthesized v0 -> Serialization.parens (expressionToExpr v0)+ Syntax.ExpressionAsExpression v0 ->+ let innerE = Syntax.asExpressionExpression v0+ typ = Syntax.asExpressionType v0+ in (Serialization.parens (Serialization.spaceSep [+ expressionToExpr innerE,+ (Serialization.cst "as"),+ (Serialization.cst (tsTypeExpressionToString typ))]))++-- | 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.parens (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.parens (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 =+ Optionals.cases init (Serialization.cst "") (\i -> case i of+ Syntax.ForInitVariable v0 -> variableDeclarationToExpr v0+ Syntax.ForInitExpression v0 -> expressionToExpr v0)+ testExpr = Optionals.cases test (Serialization.cst "") expressionToExpr+ updateExpr = Optionals.cases update (Serialization.cst "") expressionToExpr+ in (Serialization.spaceSep [+ Serialization.cst "for",+ (Serialization.parenListAdaptive [+ 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.parenListAdaptive (Lists.map patternToExpr params)+ retAnnot = Serialization.cst ": any"+ in (Serialization.spaceSep (Lists.concat [+ asyncKw,+ [+ funcKw,+ (identifierToExpr id),+ paramsExpr,+ retAnnot,+ (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 (Optionals.cases mc (functionDeclarationToExpr body) (\c -> Serialization.newlineSep [+ documentationCommentToExpr c,+ (functionDeclarationToExpr body)]))++-- | 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 = Optionals.cases mid [] (\id -> [+ identifierToExpr id])+ paramsExpr = Serialization.parenListAdaptive (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.parens (expressionToExpr test)),+ (statementToExpr consequent)]+ in (Optionals.cases alternate ifPart (\alt -> Serialization.spaceSep [+ ifPart,+ (Serialization.cst "else"),+ (statementToExpr alt)]))++-- | 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))]++isKernelTypeVarName :: String -> Bool+isKernelTypeVarName s =++ let cps = Strings.toList s+ len = Lists.length cps+ first = Optionals.fromOptional 0 (Lists.maybeHead cps)+ rest = Logic.ifElse (Equality.gt len 0) (Lists.drop 1 cps) []+ in (Logic.and (Equality.gt len 1) (Logic.and (Equality.equal first 84) (allDigits rest)))++-- | 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 =+ case obj of+ Syntax.ExpressionArrow _ -> Serialization.parens (expressionToExpr obj)+ Syntax.ExpressionConditional _ -> Serialization.parens (expressionToExpr obj)+ Syntax.ExpressionBinary _ -> Serialization.parens (expressionToExpr obj)+ Syntax.ExpressionUnary _ -> Serialization.parens (expressionToExpr obj)+ Syntax.ExpressionAssignment _ -> Serialization.parens (expressionToExpr obj)+ Syntax.ExpressionSequence _ -> Serialization.parens (expressionToExpr obj)+ Syntax.ExpressionObject _ -> Serialization.parens (expressionToExpr obj)+ Syntax.ExpressionFunction _ -> Serialization.parens (expressionToExpr obj)+ _ -> 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.parenListAdaptive (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 (Optionals.cases mc (moduleItemToExpr body) (\c -> Serialization.newlineSep [+ documentationCommentToExpr c,+ (moduleItemToExpr body)]))++-- | 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 =+ Optionals.cases source [] (\s -> [+ Serialization.cst "from",+ (stringLiteralToExpr s)])+ 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))+ Syntax.PatternTyped v0 -> typedPatternToExpr v0++-- | Render a TS.Pattern as a plain string+patternToString :: Syntax.Pattern -> String+patternToString pat =+ case pat of+ Syntax.PatternIdentifier v0 -> Syntax.unIdentifier v0+ Syntax.PatternRest v0 -> Strings.cat2 "..." (patternToString (Syntax.unRestElement v0))+ Syntax.PatternTyped v0 -> Strings.cat [+ patternToString (Syntax.typedPatternPattern v0),+ ": ",+ (tsTypeExpressionToString (Syntax.typedPatternType v0))]+ _ -> "_"++-- | Convert a TypeScript 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 =+ Optionals.cases r (Serialization.cst "return;") (\e -> Serialization.suffix ";" (Serialization.spaceSep [+ Serialization.cst "return",+ (expressionToExpr e)]))++-- | 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 =+ Optionals.cases test (Serialization.cst "default:") (\t -> Serialization.spaceSep [+ Serialization.cst "case",+ (expressionToExpr t),+ (Serialization.cst ":")])+ 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.parens (expressionToExpr discriminant)),+ (Serialization.curlyBlock Serialization.fullBlockStyle (Serialization.newlineSep (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))])++-- | Convert a string to a TypeScript line comment. Empty source lines emit `//` (no trailing space).+toLineComment :: String -> String+toLineComment s =+ Strings.intercalate "\n" (Lists.map (\line -> Logic.ifElse (Equality.equal line "") "//" (Strings.cat2 "// " line)) (Strings.lines s))++-- | Format a description and tags as a JSDoc comment. Empty doc lines emit ` *` (no trailing space) so blank lines don't carry trailing whitespace.+toTypeScriptComments :: String -> [Syntax.DocumentationTag] -> String+toTypeScriptComments desc tags =++ let descLines =+ Logic.ifElse (Equality.equal desc "") [] (Lists.map (\line -> Logic.ifElse (Equality.equal 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 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 = Optionals.cases handler [] (\c -> [+ catchClauseToExpr c])+ finallyPart =+ Optionals.cases finalizer [] (\f -> [+ Serialization.spaceSep [+ Serialization.cst "finally",+ (blockStatementToExpr f)]])+ in (Serialization.spaceSep (Lists.concat [+ [+ tryPart],+ catchPart,+ finallyPart]))++-- | Render a TypeScript type expression as a string in TS syntax+tsTypeExpressionToString :: Syntax.TypeExpression -> String+tsTypeExpressionToString t =+ case t of+ Syntax.TypeExpressionIdentifier v0 ->+ let raw = Syntax.unIdentifier v0+ in (Logic.ifElse (isKernelTypeVarName raw) "any" raw)+ Syntax.TypeExpressionAny -> "any"+ Syntax.TypeExpressionVoid -> "void"+ Syntax.TypeExpressionNever -> "never"+ Syntax.TypeExpressionArray v0 -> Strings.cat [+ "ReadonlyArray<",+ (tsTypeExpressionToString (Syntax.unArrayTypeExpression v0)),+ ">"]+ Syntax.TypeExpressionTuple v0 -> Strings.cat [+ "readonly [",+ (Strings.intercalate ", " (Lists.map tsTypeExpressionToString v0)),+ "]"]+ Syntax.TypeExpressionUnion v0 -> Strings.intercalate " | " (Lists.map tsTypeExpressionToString v0)+ Syntax.TypeExpressionIntersection v0 -> Strings.intercalate " & " (Lists.map tsTypeExpressionToString v0)+ Syntax.TypeExpressionParameterized v0 -> Strings.cat [+ tsTypeExpressionToString (Syntax.parameterizedTypeExpressionBase v0),+ "<",+ (Strings.intercalate ", " (Lists.map tsTypeExpressionToString (Syntax.parameterizedTypeExpressionArguments v0))),+ ">"]+ Syntax.TypeExpressionOptional v0 -> Strings.cat [+ tsTypeExpressionToString v0,+ " | undefined"]+ Syntax.TypeExpressionReadonly v0 -> Strings.cat2 "readonly " (tsTypeExpressionToString v0)+ Syntax.TypeExpressionUnknown -> "unknown"+ Syntax.TypeExpressionFunction _ -> "((...args: any[]) => any)"+ _ -> "unknown"++-- | 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 v0 ->+ let params = Syntax.functionTypeExpressionParameters v0+ rt = Syntax.functionTypeExpressionReturnType v0+ rendered =+ Pairs.second (Lists.foldl (\acc -> \p ->+ let i = Pairs.first acc+ soFar = Pairs.second acc+ this =+ Strings.cat [+ "_a",+ (Literals.showInt32 i),+ ": ",+ (typeExpressionToString p)]+ in (Math.add i 1, (Lists.concat2 soFar (Lists.pure this)))) (0, []) params)+ in (Strings.cat [+ "(",+ (Strings.intercalate ", " rendered),+ ") => ",+ (typeExpressionToString rt)])+ 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)++-- | Render `<pattern>: <type>` (TypeScript parameter / variable type annotation)+typedPatternToExpr :: Syntax.TypedPattern -> Ast.Expr+typedPatternToExpr tp =++ let innerPat = Syntax.typedPatternPattern tp+ typ = Syntax.typedPatternType tp+ innerStr = patternToString innerPat+ typeStr = tsTypeExpressionToString typ+ in (Serialization.cst (Strings.cat [+ innerStr,+ ": ",+ typeStr]))++-- | 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 (Optionals.cases init (patternToExpr id) (\e -> Serialization.ifx Operators.defineOp (patternToExpr id) (expressionToExpr e)))++-- | 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.parens (expressionToExpr test)),+ (statementToExpr body)])
+ src/main/haskell/Hydra/TypeScript/Syntax.hs view
@@ -0,0 +1,1729 @@+-- Note: this is an automatically generated file. Do not edit.++-- | A TypeScript 5.x syntax model for Hydra code generation++module Hydra.TypeScript.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 TypeScript identifier (variable, function, class name, etc.)+newtype Identifier =+ Identifier {+ unIdentifier :: String}+ deriving (Eq, Ord, Read, Show)++_Identifier = Core.Name "hydra.typeScript.syntax.Identifier"++-- | A qualified name like 'module.submodule.name'+type QualifiedName = [Identifier]++_QualifiedName = Core.Name "hydra.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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 tuple type (readonly [A, B, C])+ TypeExpressionTuple TupleTypeExpression |+ -- | A union type (A | B)+ TypeExpressionUnion UnionTypeExpression |+ -- | An intersection type (A & B)+ TypeExpressionIntersection IntersectionTypeExpression |+ -- | A parameterized type (e.g., Array<T>, Map<K, V>)+ TypeExpressionParameterized ParameterizedTypeExpression |+ -- | An optional type (T | undefined or T?)+ TypeExpressionOptional TypeExpression |+ -- | A readonly modifier (readonly T[], readonly [A, B])+ TypeExpressionReadonly TypeExpression |+ -- | The 'any' type+ TypeExpressionAny |+ -- | The 'unknown' type+ TypeExpressionUnknown |+ -- | The 'void' type+ TypeExpressionVoid |+ -- | The 'never' type+ TypeExpressionNever+ deriving (Eq, Ord, Read, Show)++_TypeExpression = Core.Name "hydra.typeScript.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_tuple = Core.Name "tuple"++_TypeExpression_union = Core.Name "union"++_TypeExpression_intersection = Core.Name "intersection"++_TypeExpression_parameterized = Core.Name "parameterized"++_TypeExpression_optional = Core.Name "optional"++_TypeExpression_readonly = Core.Name "readonly"++_TypeExpression_any = Core.Name "any"++_TypeExpression_unknown = Core.Name "unknown"++_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.typeScript.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.typeScript.syntax.ArrayTypeExpression"++-- | A tuple type ([A, B] or readonly [A, B])+type TupleTypeExpression = [TypeExpression]++_TupleTypeExpression = Core.Name "hydra.typeScript.syntax.TupleTypeExpression"++-- | A union type (A | B | C)+type UnionTypeExpression = [TypeExpression]++_UnionTypeExpression = Core.Name "hydra.typeScript.syntax.UnionTypeExpression"++-- | An intersection type (A & B & C)+type IntersectionTypeExpression = [TypeExpression]++_IntersectionTypeExpression = Core.Name "hydra.typeScript.syntax.IntersectionTypeExpression"++-- | 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.typeScript.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.typeScript.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,+ -- | Optional JSDoc documentation comment to emit above this property+ propertySignatureComments :: (Maybe DocumentationComment)}+ deriving (Eq, Ord, Read, Show)++_PropertySignature = Core.Name "hydra.typeScript.syntax.PropertySignature"++_PropertySignature_name = Core.Name "name"++_PropertySignature_type = Core.Name "type"++_PropertySignature_optional = Core.Name "optional"++_PropertySignature_readonly = Core.Name "readonly"++_PropertySignature_comments = Core.Name "comments"++-- | 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.typeScript.syntax.TypeParameter"++_TypeParameter_name = Core.Name "name"++_TypeParameter_constraint = Core.Name "constraint"++_TypeParameter_default = Core.Name "default"++-- | A TypeScript interface declaration (interface Foo<T> extends Bar { ... })+data InterfaceDeclaration =+ InterfaceDeclaration {+ -- | Interface name+ interfaceDeclarationName :: Identifier,+ -- | Generic parameters+ interfaceDeclarationTypeParameters :: [TypeParameter],+ -- | Interfaces this one extends+ interfaceDeclarationExtends :: [TypeExpression],+ -- | Property signatures (the interface body)+ interfaceDeclarationMembers :: [PropertySignature]}+ deriving (Eq, Ord, Read, Show)++_InterfaceDeclaration = Core.Name "hydra.typeScript.syntax.InterfaceDeclaration"++_InterfaceDeclaration_name = Core.Name "name"++_InterfaceDeclaration_typeParameters = Core.Name "typeParameters"++_InterfaceDeclaration_extends = Core.Name "extends"++_InterfaceDeclaration_members = Core.Name "members"++-- | A TypeScript type alias declaration (type Foo<T> = ...)+data TypeAliasDeclaration =+ TypeAliasDeclaration {+ -- | Alias name+ typeAliasDeclarationName :: Identifier,+ -- | Generic parameters+ typeAliasDeclarationTypeParameters :: [TypeParameter],+ -- | The right-hand-side type+ typeAliasDeclarationType :: TypeExpression}+ deriving (Eq, Ord, Read, Show)++_TypeAliasDeclaration = Core.Name "hydra.typeScript.syntax.TypeAliasDeclaration"++_TypeAliasDeclaration_name = Core.Name "name"++_TypeAliasDeclaration_typeParameters = Core.Name "typeParameters"++_TypeAliasDeclaration_type = Core.Name "type"++-- | A TypeScript 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 |+ -- | A TypeScript type assertion `<expr> as <type>`+ ExpressionAsExpression AsExpression+ deriving (Eq, Ord, Read, Show)++_Expression = Core.Name "hydra.typeScript.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"++_Expression_asExpression = Core.Name "asExpression"++-- | A TypeScript `<expression> as <type>` cast+data AsExpression =+ AsExpression {+ -- | The expression being cast+ asExpressionExpression :: Expression,+ -- | The target type+ asExpressionType :: TypeExpression}+ deriving (Eq, Ord, Read, Show)++_AsExpression = Core.Name "hydra.typeScript.syntax.AsExpression"++_AsExpression_expression = Core.Name "expression"++_AsExpression_type = Core.Name "type"++-- | An array expression [a, b, c]+type ArrayExpression = [ArrayElement]++_ArrayExpression = Core.Name "hydra.typeScript.syntax.ArrayExpression"++-- | An object expression {a: 1, b: 2}+type ObjectExpression = [Property]++_ObjectExpression = Core.Name "hydra.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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 |+ -- | A pattern with a TypeScript type annotation (`x: T`)+ PatternTyped TypedPattern+ deriving (Eq, Ord, Read, Show)++_Pattern = Core.Name "hydra.typeScript.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"++_Pattern_typed = Core.Name "typed"++-- | An object destructuring pattern {a, b: c}+data ObjectPattern =+ ObjectPattern {+ -- | The property patterns+ objectPatternProperties :: [ObjectPatternProperty]}+ deriving (Eq, Ord, Read, Show)++_ObjectPattern = Core.Name "hydra.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.syntax.RestElement"++-- | A pattern with a TypeScript type annotation (`x: T`)+data TypedPattern =+ TypedPattern {+ -- | The underlying binding pattern+ typedPatternPattern :: Pattern,+ -- | The TypeScript type annotation+ typedPatternType :: TypeExpression}+ deriving (Eq, Ord, Read, Show)++_TypedPattern = Core.Name "hydra.typeScript.syntax.TypedPattern"++_TypedPattern_pattern = Core.Name "pattern"++_TypedPattern_type = Core.Name "type"++-- | A TypeScript 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.typeScript.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.typeScript.syntax.LabeledStatement"++_LabeledStatement_label = Core.Name "label"++_LabeledStatement_body = Core.Name "body"++-- | A block statement { ... }+type BlockStatement = [Statement]++_BlockStatement = Core.Name "hydra.typeScript.syntax.BlockStatement"++-- | A variable declaration (var, let, const)+data VariableDeclaration =+ VariableDeclaration {+ variableDeclarationKind :: VariableKind,+ variableDeclarationDeclarations :: [VariableDeclarator]}+ deriving (Eq, Ord, Read, Show)++_VariableDeclaration = Core.Name "hydra.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.syntax.ThrowStatement"++-- | A return statement+type ReturnStatement = (Maybe Expression)++_ReturnStatement = Core.Name "hydra.typeScript.syntax.ReturnStatement"++-- | A break statement+type BreakStatement = (Maybe Identifier)++_BreakStatement = Core.Name "hydra.typeScript.syntax.BreakStatement"++-- | A continue statement+type ContinueStatement = (Maybe Identifier)++_ContinueStatement = Core.Name "hydra.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.syntax.MethodKind"++_MethodKind_constructor = Core.Name "constructor"++_MethodKind_method = Core.Name "method"++_MethodKind_get = Core.Name "get"++_MethodKind_set = Core.Name "set"++-- | A TypeScript 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.typeScript.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.typeScript.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 |+ -- | A top-level interface declaration+ ModuleItemInterface InterfaceDeclaration |+ -- | A top-level type alias declaration+ ModuleItemTypeAlias TypeAliasDeclaration+ deriving (Eq, Ord, Read, Show)++_ModuleItem = Core.Name "hydra.typeScript.syntax.ModuleItem"++_ModuleItem_statement = Core.Name "statement"++_ModuleItem_import = Core.Name "import"++_ModuleItem_export = Core.Name "export"++_ModuleItem_interface = Core.Name "interface"++_ModuleItem_typeAlias = Core.Name "typeAlias"++-- | 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.typeScript.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.typeScript.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.typeScript.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.typeScript.syntax.ImportDefaultSpecifier"++-- | A namespace import specifier (import * as x from ...)+newtype ImportNamespaceSpecifier =+ ImportNamespaceSpecifier {+ unImportNamespaceSpecifier :: Identifier}+ deriving (Eq, Ord, Read, Show)++_ImportNamespaceSpecifier = Core.Name "hydra.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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 TypeScript comment+data Comment =+ -- | A single-line comment (// ...)+ CommentLine String |+ -- | A block comment, delimited by slash-star and star-slash+ CommentBlock String |+ -- | A documentation comment, delimited by slash-double-star and star-slash (JSDoc)+ CommentDocumentation DocumentationComment+ deriving (Eq, Ord, Read, Show)++_Comment = Core.Name "hydra.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.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.typeScript.syntax.ClassDeclarationWithComments"++_ClassDeclarationWithComments_body = Core.Name "body"++_ClassDeclarationWithComments_comments = Core.Name "comments"