From c5e89ecf06145895bd8c8bca19e7e0587cfe1082 Mon Sep 17 00:00:00 2001 From: pimjager Date: Fri, 20 May 2016 13:44:21 +0200 Subject: [PATCH] readchar in sem --- examples/codeGen.spl | 1 + sem.icl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/codeGen.spl b/examples/codeGen.spl index e5d938b..77b02a1 100644 --- 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 --- 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 -- 2.20.1