aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorCamil Staps2017-03-06 21:59:17 +0100
committerCamil Staps2017-03-06 22:00:30 +0100
commit8f738f2b59513534b75e29250ae9ea650fc8d7ab (patch)
tree9ccd9f81f56280d6d3980bcc008484145abffb94 /README.md
parentLambda-case (diff)
Readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..740e1a9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,46 @@
+# clean-compiler
+
+The [Clean][clean] compiler.
+
+The official Clean compiler can be found at
+[https://svn.cs.ru.nl/repos/clean-compiler/][cocl].
+This is a fork to implement experimental new features.
+
+---
+
+## Contents
+
+1\. [Syntactic sugar](#1-syntactic-sugar)
+1.1. [Lambda-case](#11-lambda-case)
+
+---
+
+## 1. Syntactic sugar
+
+### 1.1. Lambda-case
+
+Similar to [GHC's LambdaCase][ghclambdacase], this is a sugar for lambda
+expressions where the argument is only used in a `case .. of` expression. For
+example,
+
+```clean
+\case of
+ 0 = "zero"
+ 1 = "one"
+ _ = "many"
+```
+
+is transformed to
+
+```clean
+\x -> case x of
+ 0 = "zero"
+ 1 = "one"
+ _ = "many"
+```
+
+where `x` is a fresh variable.
+
+[clean]: http://clean.cs.ru.nl
+[cocl]: https://svn.cs.ru.nl/repos/clean-compiler/
+[ghclambdacase]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#lambda-case