-
Notifications
You must be signed in to change notification settings - Fork 24
Developers
This page is for developers of Hydra itself. See Contributors.
See also:
- Developer Recipes - Step-by-step guides for common development tasks, including creating new Hydra implementations
Haskell is Hydra's bootstrapping language. The Hydra kernel and much of its extended functionality is written in a Haskell-based domain-specific language (DSL), then code-generated into Haskell, Java, and Python. The source code is organized by functional concern into several categories:
The Hydra/Sources directory contains DSL-based definitions that are code-generated into all implementations:
-
Kernel/Types: Core type system definitions
-
Kernel/Terms: Term-level operations
- Inference.hs - Type inference
- Rewriting.hs - Term rewriting and transformation
- Reduction.hs - Term reduction/evaluation
- Subdirectories for Adapt, Encode, Decode, Extract, etc.
-
Haskell: Haskell language support (AST, coder, serialization)
-
Test: Cross-language test suites
- TestSuite.hs - Common test cases for all implementations
- Inference - Type inference test cases
-
Libraries.hs: Hydra standard library definitions
These sources are code-generated into:
- Haskell: src/gen-main/haskell
- Java: hydra-java/src/gen-main/java
- Python: hydra-python/src/gen-main/python
The Hydra/Ext/Sources directory contains DSL-based definitions for language coders, data format adapters, and domain-specific models:
- Language coders: Avro, Java, Python, Scala, Protobuf, and many others
- Property graphs: Pg (includes TinkerPop support)
- Semantic web: Rdf, Shacl, Owl
- Query languages: GraphQL, Cypher, SQL
To write source definitions, use the DSLs in Hydra/Dsl:
Primitive functions (built-ins) are implemented natively in each language:
See the Release process page for detailed instructions on releasing Hydra-Haskell, Hydra-Java, and Hydra-Python.