Warning
This is a work-in-progress, feel free to contribute!
This template provides a starting point for Effekt projects.
After using this template, follow these steps to set up your project:
-
Set up your development environment:
- Clone this repository locally.
- Open it in VSCode.
- Install the Effekt VSCode extension offered in the pop-up in the bottom right.
-
Customize the project:
- Open
flake.nix
and update the project name and other relevant values (follow the comments). - Push your
flake.nix
file after the changes and see if the CI agrees.
- Open
-
Replace this
README
with your own!- Please link back to this repo if you can :)
Run the main file:
effekt src/main.effekt
This (like many other Effekt commands) uses the JavaScript backend by default.
To use a different backend, add the --backend <backend>
flag.
Run the tests:
effekt src/test.effekt
Open the REPL:
effekt
Build the project:
effekt --build src/main.effekt
This builds the project into the out/
directory, creating a runnable file out/main
.
To see all available options and backends, run:
effekt --help
While Nix installation is optional, it provides several benefits:
Update dependencies (also runs automatically in CI):
nix flake update
Open a shell with all necessary dependencies:
nix develop
Run the main entry point:
nix run
Build the project (output in result/bin/
):
nix build
effekt-stm
- This very project!
.github/workflows/*.yml
: Contains the CI definitionssrc/
: Contains the source codemain.effekt
: Main entry pointtest.effekt
: Entry point for testslib.effekt
: Library code imported bymain
andtest
flake.nix
: Package configuration in a Nix flakeflake.lock
: Auto-generated lockfile for dependenciesLICENSE
: Project licenseREADME
: This README file
Two GitHub Actions are set up:
-
flake-check
:- Checks the
flake.nix
file, builds and tests the project - Runs on demand, on
main
, and on PRs - To run custom commands, add a step using:
nix run -- <ARGS>
to run the main entry point with the given argumentsnix develop -c '<bash command to run>'
to run commands in the correct environment
- Checks the
-
update-flake-lock
:- Updates package versions in
flake.nix
- Runs on demand and weekly (Mondays at 06:00 UTC)
- Updates package versions in