about summary refs log tree commit diff
path: root/lib/Reporter.ml
diff options
context:
space:
mode:
authorMalte Voos <git@mal.tc>2024-06-23 23:31:59 +0200
committerMalte Voos <git@mal.tc>2024-06-24 00:16:55 +0200
commit5d227bcd0055d02e1d49a3dcd27e80a756923d5b (patch)
treeda468ad3a8f3caf709b731ca2678c86a5a015990 /lib/Reporter.ml
parent8d40541003736d5319ec981278338e8c8c66daf6 (diff)
downloadtoytt-5d227bcd0055d02e1d49a3dcd27e80a756923d5b.tar.gz
toytt-5d227bcd0055d02e1d49a3dcd27e80a756923d5b.zip
split code into smaller libraries and make a better repl
Diffstat (limited to 'lib/Reporter.ml')
-rw-r--r--lib/Reporter.ml32
1 files changed, 0 insertions, 32 deletions
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