2
1
Fork
You've already forked idris2-tutorial
0
Functional Programming in Idris 2 https://github.com/stefan-hoeck/idris2-tutorial
  • Idris 92.4%
  • Raku 3.6%
  • Vim Script 3.1%
  • Dockerfile 0.9%
Stefan Höck bca1b5f63e
Merge pull request #15 from gtzampanakis/fix_currying_article_name_errors
Fix "Undefined name" errors in Currying.md examples
2026年06月14日 03:36:19 +00:00
.github Add editorconfig 2025年08月08日 23:44:13 -04:00
resources [ doc ] Interactive programming in Neovim ( #25 ) 2022年03月01日 15:42:26 +00:00
scripts Filter out nonbreaking spaces from katla 2025年08月18日 18:17:37 -04:00
src Merge pull request #15 from gtzampanakis/fix_currying_article_name_errors 2026年06月14日 03:36:19 +00:00
.editorconfig Add editorconfig 2025年08月08日 23:44:13 -04:00
.gitignore Initial mdbook conversion 2025年08月05日 12:17:24 -04:00
book.toml Tweak mdBook settings 2025年08月19日 19:34:44 -04:00
CONTRIBUTING.md Rewrite Introduction 2025年08月09日 00:20:17 -04:00
conversion-todo.org Tweak mdBook settings 2025年08月19日 19:34:44 -04:00
Dockerfile Add mdbook-alerts to dockerfile 2025年08月15日 00:41:41 -04:00
LICENSE Update Copyright Notice 2025年08月06日 07:21:51 -04:00
pack.toml [ fix ] switched to pack ( #47 ) 2022年10月30日 11:15:21 +01:00
README.md Organize ipkg in chapter order 2025年08月08日 15:17:02 -04:00
tutorial.ipkg Edit chapter 3 2025年08月18日 20:20:09 -04:00

Idris 2 Community Tutorial

This project is an mdbook based off of Stefan Höck's idris2-tutorial. At present, it's largely just a direct port, but will evolve as the community maintains it.

This book is rendered automatically from the main branch with GitHub pages, which can be viewed at https://idris-community.github.io/idris2-tutorial/. The summary page can also be used as a table of contents for direct viewing in GitHub, though the rendered version is much preferable.

Contributing

Please see CONTRIBUTING.md for style and formatting guidance before submitting a PR.

Dependencies and Building

Building this mdbook is slightly complicated, as highlight.js has no support for idris, we are using katla to perform the highlighting, and injecting that highlighting into the Markdown before mdbook has a chance to see it using the build-book Raku script.

Idris Dependencies

This project requires pack and katla to build.

After either installing pack from your distro's package manager or following the quick installation directions in pack's readme, you can install katla with:

pack install-app katla

Raku Dependencies

This project requires Raku and the File::Temp, Shell::Command, and paths modules to build.

I recommend installing raku and zef through your distro's package manger. If your package manger has lacks either zef or raku, installation through rakubrew is an option, and if your package manager has raku but lacks zef, zef can be quite easily installed from source.

Once you have zef up and running, the dependencies for this project can be installed with:

zef install File::Temp Shell::Command paths

mdbook

Many distros have mdbook in their package manager, this is the recommended way to install it. If your distro lacks mdbook, or if the version it packages proves to be too old to build this project, after setting up a Rust toolchain with rustup, you can install mdbook from source with:

cargo install mdbook

Building

Once you have all the dependencies in place, simply run:

Important

The build-book script assumes that the Idris code in the project has already been built, and will not function properly if the Idris build directory is not populated, as the build files are required by katla to provide syntax highlighting.

Run pack build after a clean checkout or making any changes to Idris files to ensure that the build directory is up to date before running the build-book script.

./scripts/build-book

from this project's root directory, and the rendered book will be available in the book directory. I recommend using a simple static file server such as python -m http.serverto view the rendered book in your browser, simply opening the files directly in your browser is unlikely to work.

Formatting

This project uses mdformat to ensure consistency in Markdown formatting. While this is not strictly necessary to have locally, it is linted against in CI.

The mdformat configuration used in CI can be replicated by running the following commmand from the base directory of the project:

mdformat --wrap=no --number **/*.md