


## error-message.api
# Compiled by:
# src/lib/compiler/front/basics/basics.sublib### "To err is human, but it feels divine."
###
### -- Mae West
stipulate
package lnd = line_number_db; # line_number_db is from src/lib/compiler/front/basics/source/line-number-db.pkg package pp = prettyprint; # prettyprint is from src/lib/prettyprint/big/src/prettyprint.pkg package sci = sourcecode_info; # sourcecode_info is from src/lib/compiler/front/basics/source/sourcecode-info.pkgherein
api Error_Message {
#
Severity = WARNING | ERROR;
Plaint_Sink; /* = Severity -> String -> (pp::Stream -> Void)
-> Void */
Error_Function
=
lnd::Source_Code_Region
->
Plaint_Sink;
Errors; # = { error_fn: Error_Function,
# error_match: Source_Code_Region -> String,
# saw_errors: Ref( Bool )
# };
saw_errors: Errors -> Bool;
exception COMPILE_ERROR;
default_plaint_sink: Void -> pp::Device;
null_error_body: pp::Stream -> Void;
error
:
sci::Sourcecode_Info
->
lnd::Source_Code_Region
->
Plaint_Sink;
# With a known location string but
# without access to the actual source:
#
error_no_source
:
( pp::Device,
Ref( Bool )
)
-> String
-> Plaint_Sink;
error_no_file
:
( pp::Device,
Ref( Bool )
)
-> lnd::Source_Code_Region
-> Plaint_Sink;
match_error_string
:
sci::Sourcecode_Info
-> lnd::Source_Code_Region
-> String;
errors
:
sci::Sourcecode_Info
-> Errors;
errors_no_file
:
( pp::Device,
Ref( Bool )
)
-> Errors;
impossible: String -> X;
impossible_with_body
:
String
-> (pp::Stream -> Void)
-> X;
};
end;
## Copyright 1989 by AT&T Bell Laboratories
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2011,
## released under Gnu Public Licence version 3.


