/language-limp

An attempt at designing a new, perfectly uniform syntax

MIT LicenseMIT

Limp

Limp is an attempt at defining a programming language syntax that is a mix of Haskell and YAML. Limp pushes indentation dependence to the limit by using it more uniformly and more broadly. For example, the following Limp code

some-function
    nested-function1 arg1 arg2
    nested-function2 arg3 arg4

is parenthesized as

(some-function
    (nested-function1 arg1 arg2)
    (nested-function2 arg3 arg4))

as a reasonable person might expect, whereas Haskell would interpret it as

((((((some-function
    nested-function1) arg1) arg2)
    nested-function2) arg3) arg4)

or the more familiar

some-function nested-function1 arg1 arg2 nested-function2 arg3 arg4

This happens because Haskell ignores indentation in expressions, whereas they are treated uniformly in Limp.

Additionally, Limp is almost homoiconic in the sense that a Limp program is spiritually a YAML document (except with a slightly different syntax): it is composed of (nested) lists and dictionaries of some base syntactic categories like integer literals and identifiers.

The name "Limp" is meant to be reminiscent of [Lisp](https://en.wikipedia.org/wiki/Lisp_(programming_language), since Limp is similar to Lisp syntactically except for it's use of indentation to signify grouping as opposed to parentheses.

Also featuring:

  • Mixfix operators borrowed form Agda.
  • Syntactically meaningful comments: comments are not plain strings; they have the same nested structure as code, and in fact, code and comments can be mutually nested. Code in comments is type-checked.

Installation

Use Stack: stack install limp.

Development

We exclusively use Stack for development.

Usage

limp --help