https://github.com/cardano-foundation/fine-types
FineTypes is an interface description language (IDL) focussing on types
https://github.com/cardano-foundation/fine-types
cardano haskell interface-description-language json-schema
Last synced: 14 days ago
JSON representation
FineTypes is an interface description language (IDL) focussing on types
- Host: GitHub
- URL: https://github.com/cardano-foundation/fine-types
- Owner: cardano-foundation
- License: apache-2.0
- Created: 2023-08-18T10:38:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-13T13:54:30.000Z (almost 2 years ago)
- Last Synced: 2025-12-23T03:31:16.598Z (about 1 month ago)
- Topics: cardano, haskell, interface-description-language, json-schema
- Language: Haskell
- Homepage:
- Size: 1.57 MB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FineTypes
🚧 WORK IN PROGRESS 🚧
## Overview
FineTypes is an interface description language (IDL) focussing on types. You can use it to specify data types that are interoperable between different programming languages.
Example:
```
TxOut = Addr × Value × (Datum ⊎ DataHash)? × Script?;
```
FineTypes allows you to
* Define data types concisely using mathematical notation.
* Map between data types using algebraic transformations, such as `(A + B) × C = (A × C) + (B × C)`.
* Export type definitions to different programming languages, currently:
* Haskell
* Export type definitions to different data schemas, currently
* OpenAPI: Schema Objects
FineTypes was originally conceived to be able to specify all types in the [Cardano ledger specification][cardano-ledger] in a way that is both machine readable and visually matches the PDF document.
## Contents
This repository contains
* The `fine-types` Haskell package and executable.
* The `cardano-ledger-types` package containing a reference specification of the types from the [Cardano ledger specification][cardano-ledger] in different eras (Shelley, …, Babbage).
[cardano-ledger]: https://github.com/input-output-hk/cardano-ledger/releases/latest/