Abstractions

Applications

Assignments

Backtracking

Booleans

Comments

Concurrency

Compiler-compiler

Exceptions

Files

Functions

Hashing

I/O

Lazy evaluation

Lists

Macros

Metaprogramming

Native Calls

Numbers

Packages

Prolog

Property Lists

REPL

Streams

Strings

Symbols

Tuples

Types

Vectors

The Shen Guide

Mark Tarver, (c) 2015

Shen is a next generation functional programming language built on a RISC Lisp called Kl. Shen is specifically designed for a small footprint and extreme portability, but nevertheless features a comprehensively typed functional programming language with a compiler-compiler and a Prolog engine. Shen was first proposed at the European Symposium of Lisp in 2009 and appeared in 2011. Shen transitioned to BSD in 2015.

The Shen guide is for people who already know functional programming and want to begin programming with Shen. We recommend you read the following.

  • Shen in 15 minutes tutorial for experienced functional programmers who want a quick start.
  • Look up the guide for System Functions when needed.
  • Read this guide.
  • Use the resources of fast reference on the left for key ideas.
  • The Shen Official Standard which gives a compact technical account of Kl and Shen.

Shen type theory is programmed in sequent calculus. If you have no experience in this notation we recommend

The official guide to Shen, The Book of Shen, third edition, gives a complete account of Shen from implementation to application. .


Sections

1 Introducing Shen

REPL
Applications
Numbers
Booleans
Strings
Symbols
Assignments
Comments

2. Sequences

Lists
Tuples
Vectors

3. Functions

Abstractions
Defining Functions
Higher Order Functions
Pattern Matching
Backtracking

4. I/O

I/O
Files
Streams

5. Packages

Packages

6. MetaProgramming

Macros
Metaprogramming

7. Error Handling

Exceptions

8. Lazy Evaluation

Lazy evaluation

9. Types and Type Checking

Types
Basic
Functions
Synonyms
Sequent calculus

10. The Shen-YACC Compiler-compiler

Compiler-compiler

11. Shen Prolog

Prolog

12. Native Calls

Native Calls

13. System Functions

System Functions