repositories
/
cc1516.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24472f9
)
readchar in sem
author
pimjager
<pim@pimjager.nl>
Fri, 20 May 2016 11:44:21 +0000
(13:44 +0200)
committer
pimjager
<pim@pimjager.nl>
Fri, 20 May 2016 11:44:21 +0000
(13:44 +0200)
examples/codeGen.spl
patch
|
blob
|
history
sem.icl
patch
|
blob
|
history
diff --git
a/examples/codeGen.spl
b/examples/codeGen.spl
index
e5d938b
..
77b02a1
100644
(file)
--- a/
examples/codeGen.spl
+++ b/
examples/codeGen.spl
@@
-38,6
+38,7
@@
main() {
var x = (True, 5) : (False,0) : [];
var sdaf = isE(x1);
var z = isEmpty(x1);
+ Char c = read();
x.hd.snd = 8;
return;
}
diff --git
a/sem.icl
b/sem.icl
index
0ffcdd2
..
0c5b552
100644
(file)
--- a/
sem.icl
+++ b/
sem.icl
@@
-51,7
+51,7
@@
variableStream = map toString [1..]
defaultGamma :: Gamma //includes all default functions
defaultGamma = extend "print" (Forall ["a"] ((IdType "a") ->> VoidType))
$ extend "isEmpty" (Forall ["a"] ((ListType (IdType "a")) ->> BoolType))
- $ extend "read" (Forall []
(IntType ->> (ListType CharType))
)
+ $ extend "read" (Forall []
CharType
)
zero
sem :: AST -> Either [SemError] AST