aboutsummaryrefslogtreecommitdiff
path: root/Sil/Error.icl
diff options
context:
space:
mode:
authorCamil Staps2017-07-27 23:46:04 +0200
committerCamil Staps2017-07-27 23:46:04 +0200
commit3e21c67505edf6441d7561b2d52359468861b549 (patch)
tree0c030c6186bf1b653f6806483f57ffffb4481415 /Sil/Error.icl
parentCentralise errors (needed for positional errors #5) (diff)
Cleanup
Diffstat (limited to 'Sil/Error.icl')
-rw-r--r--Sil/Error.icl3
1 files changed, 3 insertions, 0 deletions
diff --git a/Sil/Error.icl b/Sil/Error.icl
index b5d5941..6a9d07e 100644
--- a/Sil/Error.icl
+++ b/Sil/Error.icl
@@ -1,5 +1,6 @@
implementation module Sil.Error
+import StdFile
import StdString
import Text
@@ -23,3 +24,5 @@ where
toString (C_TypeMisMatch t e) = "Type mismatch: expected " <+ t <+ " for '" <+ e <+ "'."
toString (C_BasicInitWithoutValue n) = "Basic value '" <+ n <+ "' must have an initial value."
toString (UnknownError e) = "Unknown error: " <+ e <+ "."
+
+instance <<< Error where <<< f e = f <<< toString e <<< "\r\n"