https://github.com/05st/artemis
Statically typed, high-level functional programming language.
https://github.com/05st/artemis
functional functional-programming haskell interpreter language languages programming-language
Last synced: 4 months ago
JSON representation
Statically typed, high-level functional programming language.
- Host: GitHub
- URL: https://github.com/05st/artemis
- Owner: 05st
- License: bsd-3-clause
- Created: 2021-07-07T23:31:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-22T16:58:17.000Z (over 4 years ago)
- Last Synced: 2025-04-07T05:42:07.724Z (10 months ago)
- Topics: functional, functional-programming, haskell, interpreter, language, languages, programming-language
- Language: Haskell
- Homepage:
- Size: 259 KB
- Stars: 17
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# Artemis
Artemis is a statically typed, functional programming language with some inspirations from Rust, ML, and Haskell. It doesn't have too many exciting features as I am writing it for learning purposes.
## Features
At the moment, Artemis has all of these implemented:
- Type inference (Hindley-Milner)
- Algebraic data types
- Pattern matching
- Module system via namespaces/imports
- User-defined prefix/infix operators
- A small standard library
- Implementations for common data types (lists, tuples, etc.)
- Non-significant whitespace
- Automatic currying/partial application
- Immutable variables by default
- Built-in functions/types
- Mutually recursive functions
- Recursively defined types
## Planned
It would be great to have these implemented eventually:
- Typeclasses (for ad-hoc polymorphism)
- Exhaustiveness/redundancy checking for pattern matching
- An improved standard library
- Bytecode VM
## Examples
```
data List = Cons(a, List) | Empty;
let fold : (a -> b -> b) -> b -> List -> b
= fn(f, init, list)
=> match list with
Cons(a, list') -> f(a, fold(f, init, list')),
Empty -> init;
// 'fold' was automatically curried
let sumInts = fold(addInt, 0);
// outputs 15
print(showInt(sumInts([1, 2, 3, 4, 5])));
```
More can be found [here](https://github.com/05st/artemis/tree/master/examples).
## Contributing
Feel free to open a pull request!
## Credits
[brightly-salty](https://github.com/brightly-salty)