From 5d227bcd0055d02e1d49a3dcd27e80a756923d5b Mon Sep 17 00:00:00 2001 From: Malte Voos Date: Sun, 23 Jun 2024 23:31:59 +0200 Subject: split code into smaller libraries and make a better repl --- lib/Reporter.ml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 lib/Reporter.ml (limited to 'lib/Reporter.ml') diff --git a/lib/Reporter.ml b/lib/Reporter.ml deleted file mode 100644 index a90966c..0000000 --- a/lib/Reporter.ml +++ /dev/null @@ -1,32 +0,0 @@ -module Message = -struct - type t = - | SyntaxError - | IllTyped - | UnboundVariable - | CannotInferType - | Bug - - let default_severity : t -> Asai.Diagnostic.severity = - function - | SyntaxError -> Error - | IllTyped -> Error - | UnboundVariable -> Error - | CannotInferType -> Error - | Bug -> Bug - - let short_code : t -> string = - function - | SyntaxError -> "E001" - | IllTyped -> "E002" - | UnboundVariable -> "E003" - | CannotInferType -> "E004" - | Bug -> "BUG" -end - -include Asai.Reporter.Make(Message) - -let unbound_variable id = fatalf UnboundVariable "unbound variable %a" Ident.pp id -let expected_universe fmt x = fatalf IllTyped "expected a universe but got %a" fmt x - -let bug msg = fatalf Bug msg -- cgit 1.4.1