https://github.com/raviqqe/fmm
The uncurried minimal functional programming language for CPS transformation
https://github.com/raviqqe/fmm
Last synced: 7 months ago
JSON representation
The uncurried minimal functional programming language for CPS transformation
- Host: GitHub
- URL: https://github.com/raviqqe/fmm
- Owner: raviqqe
- License: apache-2.0
- Created: 2021-01-05T02:52:19.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-23T12:14:28.000Z (over 1 year ago)
- Last Synced: 2025-03-29T03:41:32.748Z (8 months ago)
- Language: Rust
- Homepage:
- Size: 1.06 MB
- Stars: 18
- Watchers: 2
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- programming-languages - F-- - Uncurried minimal functional programming language. (Other)
README
# F--
[](https://github.com/raviqqe/fmm/actions)
[](LICENSE)
The uncurried minimal functional programming language
It's designed to be a compiler target for high-level functional programming languages.
## Features
- [SSA](https://en.wikipedia.org/wiki/Static_single_assignment_form)
- Minimal
- Only 4 control instructions
- `branch`
- `call`
- `if`
- `return`
- No backward jump
- Portable
- Pointer-sized integer
- C-like union type
- Boolean type
- Structural typing
- CPS transformation
- IR builder library
### Backends
- [LLVM](fmm-llvm)
- [C](fmm-c)
- No guarantee for tail call optimization
## Limitations
- Inductive types
- Weak typing
- No type inference
### Calling convention compatibility table
| Caller \ Callee | Target (C) | Tail | Source (CPS) |
| --------------- | ---------- | ---- | ------------ |
| Target (C) | x | x | \*1 |
| Tail | x | x | \*1 |
| Source (CPS) | x | x | x |
- \*1: Suspension in functions is not supported.
## Design notes
- Expressions have no side effect.
- You can use them in constants.
- Instructions _can_ have side effects.
## License
[Apache 2.0](LICENSE)