#+TITLE: The Carth programming language
Purely functional programming with lisp-syntax. Less infix, more parens!
Visit [[https://carth.jo.zone/][https://carth.jo.zone/]] for an overview of the language and more info.
- Scheme-inspired syntax and feel
- Static, Hindley-Milner typechecking à la ML
- Algebraic datatypes
- LLVM-based backend
This is a high-level overview of what is planned for the language, and
some of the points are just tentative. See [[./TODO.org][TODO.org]] for more extensive
list of planned features and more detailed descriptions.
- Higher kinded types
- Effect system
- Linear types
This project is written in [[https://haskell.org][Haskell]] and uses the [[https://www.haskellstack.org/][Stack]] build
system. The external dependencies required are [[https://llvm.org/][LLVM]] version 9.
To build the project, simply run ~stack build~. To install (copy the
binary), run ~stack install~.
The Carth compiler needs to link with a foreign core library of
functions that can't be defined in Carth itself, to do things like
input/output and pointer manipulation etc. This library is written
in Rust and is located in "foreign-core/". Just build with ~cargo
# General help
# Help for a specific subcommand
carth help c
# Compile and run a program with default output filename
carth c examples/test.carth
# Compile a program with a specific output filename
carth c -o examples/test.bin examples/test.carth
Copyright (C) 2019 Johan Johansson
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.