Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Syntax

Elara’s syntax is primarily inspired by Haskell and F#. It aims to be lightweight, concise, and flexible. It is layout-sensitive, meaning that indentation is significant and used to denote code blocks.

This section covers the various syntactic constructs in Elara:

Lexical Structure

Rules for identifiers, literals, keywords, and the layout system.

Comments

How to write single-line and multi-line comments.

Annotations

Attaching metadata to constructs, such as specifying operator precedence.