Glee is a toy language inspired by Joy. Unlike Joy, Glee has integers and booleans. See example.glee
for an example of Glee code. It's primitive combinators are:
k
, where[B] [A] k == A
cake
, where[B] [A] cake == [[B] A] [A [B]]
choose
, wheretrue [B] [A] choose == [B]
andfalse [B] [A] choose == [A]
uncons
, where[A B] uncons == [A] [B]
- Arithmetic operators:
+
,-
,*
,/
- Boolean operators:
&&
,not
All other words are derived from these. The base is inspired by an article The Theory of Concatenative Combinators by Brent Kerby.
Running Glee requires OCaml and Menhir.
Clone the repository:
git clone https://github.com/andreas/glee
Compile the sources:
cd glee
make
This produces an executable glee
. To run Glee:
./glee
This will put you in an interactive console. You can optionally specify an input file to run before going into interactive mode:
./glee example.glee
Copyright (c) 2012 Andreas Garnæs. See LICENSE for details.