From e3d00f6146c3c54bb3d16debb22c28f4fb01dc9f Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Thu, 15 Sep 2022 13:48:08 +0200 Subject: [PATCH] Add a Bool type to the initial type checking environment --- src/checker.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/checker.ts b/src/checker.ts index 8d72f953c..a67a8d458 100644 --- a/src/checker.ts +++ b/src/checker.ts @@ -1852,6 +1852,7 @@ export class Checker { env.add('$', new Forall([ f, a ], [], new TArrow([ new TArrow([ a ], b), a ], b)), Symkind.Var); env.add('String', new Forall([], [], this.stringType), Symkind.Type); env.add('Int', new Forall([], [], this.intType), Symkind.Type); + env.add('Bool', new Forall([], [], this.boolType), Symkind.Type); env.add('True', new Forall([], [], this.boolType), Symkind.Var); env.add('False', new Forall([], [], this.boolType), Symkind.Var); env.add('+', new Forall([], [], new TArrow([ this.intType, this.intType ], this.intType)), Symkind.Var);