## 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 = standard_prettyprinter; # standard_prettyprinter is from
src/lib/prettyprint/big/src/standard-prettyprinter.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::Prettyprinter -> 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::Prettyprint_Output_Stream;
null_error_body: pp::Prettyprinter -> 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::Prettyprint_Output_Stream,
Ref( Bool )
)
-> String
-> Plaint_Sink;
error_no_file
:
( pp::Prettyprint_Output_Stream,
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::Prettyprint_Output_Stream,
Ref( Bool )
)
-> Errors;
impossible: String -> X;
impossible_with_body
:
String
-> (pp::Prettyprinter -> Void)
-> X;
};
end;
## Copyright 1989 by AT&T Bell Laboratories
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.