~jojo/Carth

1aafc4cf7a69ccee4a0c87a618b2119ba7868732 — JoJo 2 years ago 504c4e6
Fix section-levels in README
1 files changed, 77 insertions(+), 79 deletions(-)

M README.org
M README.org => README.org +77 -79
@@ 5,82 5,80 @@ Rewrite of [[https://github.com/bryal/kvasir][kvasir]] in Haskell.

Purely functional programming with lisp-syntax. Less infix, more parens!

** Features
   - Scheme-inspired syntax and feel
   - Static, Hindley-Milner typechecking à la ML
   - Currying
   - Compiled with LLVM-based backend
   - [[file:REFERENCE.org::#Literate-Carth][Native support for literate programming in Org-mode]]

** Examples
   Not much is working yet, but here's an example of something simple
   that compiles and runs today. Note that impure functions like
   ~printInt~ only temporarily exist for development purposes.

   #+BEGIN_SRC scheme
   (define (main _)
     (seq (printInt (id 1337))
          (seq (printInt 42)
               (printInt 69))))
   (define (id x) x)
   (define (seq _ b) b)
   #+END_SRC

** Roadmap

   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.

   - Algebraic datatypes
   - Typeclasses
   - Higher kinded types
   - Effect system
   - Linear types

** Building
   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 8. To
   build the project, simply run ~stack build~. To install (copy the
   binary), run ~stack install~.

** Running
   #+BEGIN_EXAMPLE bash
   # General help
   carth help
   carth -h
   carth --help

   # Help for a specific subcommand
   carth help interpret
   carth help c

   # Interpret a file
   carth i examples/test.carth

   # Compile and run a program with default output filename
   carth c examples/test.carth
   ./out

   # Compile a program with a specific output filename
   carth c -o examples/test.bin examples/test.carth
   ./examples/test.bin
   #+END_EXAMPLE

** License

   AGPLv3

   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.

   See [[./LICENSE][LICENSE]]
* Features
  - Scheme-inspired syntax and feel
  - Static, Hindley-Milner typechecking à la ML
  - Currying
  - Compiled with LLVM-based backend
  - [[https://carth.jo.zone/pages/reference.html#Literate-Carth][Native support for literate programming in Org-mode]]

* Examples
  Not much is working yet, but here's an example of something simple
  that compiles and runs today. Note that impure functions like
  ~printInt~ only temporarily exist for development purposes.

  #+BEGIN_SRC scheme
  (define (main _)
    (seq (printInt (id 1337))
         (seq (printInt 42)
              (printInt 69))))
  (define (id x) x)
  (define (seq _ b) b)
  #+END_SRC

* Roadmap
  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.

  - Algebraic datatypes
  - Typeclasses
  - Higher kinded types
  - Effect system
  - Linear types

* Building
  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 8. To
  build the project, simply run ~stack build~. To install (copy the
  binary), run ~stack install~.

* Running
  #+BEGIN_EXAMPLE bash
  # General help
  carth help
  carth -h
  carth --help

  # Help for a specific subcommand
  carth help interpret
  carth help c

  # Interpret a file
  carth i examples/test.carth

  # Compile and run a program with default output filename
  carth c examples/test.carth
  ./out

  # Compile a program with a specific output filename
  carth c -o examples/test.bin examples/test.carth
  ./examples/test.bin
  #+END_EXAMPLE

* License
  AGPLv3

  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.

  See [[./LICENSE][LICENSE]]