aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md17
-rw-r--r--frontend/parse.icl2
2 files changed, 17 insertions, 2 deletions
diff --git a/README.md b/README.md
index e95ea5e..a0e90e9 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,9 @@ This is a fork to implement experimental new features.
## Contents
1\. [Syntactic sugar](#1-syntactic-sugar)
-1.1. [Lambda-case](#11-lambda-case)
+1.1. [Lambda-case](#11-lambda-case)
+2\. [Syntax changes](#2-syntax-changes)
+2.1. [Use of the `module` keyword](#21-use-of-the-module-keyword)
---
@@ -48,6 +50,19 @@ LambdaAbstr = ...
| \case of {CaseAltDef}+
```
+## 2. Syntax changes
+
+### 2.1. Use of the `module` keyword
+
+The `module` keyword is only a keyword on the topmost level. This allows for
+using it as a record field, for example:
+
+```clean
+:: MyType = { module :: Int }
+```
+
+However, it is not allowed to define a function named `module`.
+
[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
diff --git a/frontend/parse.icl b/frontend/parse.icl
index 03a968d..95e7b9d 100644
--- a/frontend/parse.icl
+++ b/frontend/parse.icl
@@ -5213,7 +5213,7 @@ wantNonUpperCaseName string pState
*/
wantLowerCaseName :: !String !ParseState -> (!String, !ParseState)
wantLowerCaseName string pState
- # (token, pState) = nextToken GeneralContext pState
+ # (token, pState) = nextToken TypeContext pState
= case token of
IdentToken name
| isLowerCaseName name