2 /* --------------------------------------------------------------------------
3 * Error handling support functions
5 * The Hugs 98 system is Copyright (c) Mark P Jones, Alastair Reid, the
6 * Yale Haskell Group, and the Oregon Graduate Institute of Science and
7 * Technology, 1994-1999, All rights reserved. It is distributed as
8 * free software under the license in the file "License", which is
9 * included in the distribution.
11 * $RCSfile: errors.h,v $
13 * $Date: 2000/03/24 14:32:03 $
14 * ------------------------------------------------------------------------*/
16 extern Void internal ( String) HUGS_noreturn;
17 extern Void fatal ( String) HUGS_noreturn;
19 #define Hilite() doNothing()
20 #define Lolite() doNothing()
21 #define errorStream stdout
23 #define ERRMSG(l) Hilite(); errHead(l); FPrintf(errorStream,
24 #define EEND ); Lolite(); errFail()
25 #define EEND_NO_LONGJMP ); Lolite(); errFail_no_longjmp()
27 #define ERRTEXT Hilite(); FPrintf(errorStream,
28 #define ERREXPR(e) Hilite(); printExp(errorStream,e); Lolite()
29 #define ERRTYPE(e) Hilite(); printType(errorStream,e); Lolite()
30 #define ERRCONTEXT(qs) Hilite(); printContext(errorStream,qs); Lolite()
31 #define ERRPRED(pi) Hilite(); printPred(errorStream,pi); Lolite()
32 #define ERRKIND(k) Hilite(); printKind(errorStream,k); Lolite()
33 #define ERRKINDS(ks) Hilite(); printKinds(errorStream,ks); Lolite()
34 #define ERRFD(fd) Hilite(); printFD(errorStream,fd); Lolite()
36 extern Void errHead ( Int ); /* in main.c */
37 extern Void errFail ( Void ) HUGS_noreturn;
38 extern Void errFail_no_longjmp ( Void );
39 extern Void errAbort ( Void );
40 extern Cell errAssert ( Int );
42 extern Void printExp ( FILE *,Cell ); /* in output.c */
43 extern Void printType ( FILE *,Cell );
44 extern Void printContext ( FILE *,List );
45 extern Void printPred ( FILE *,Cell );
46 extern Void printKind ( FILE *,Kind );
47 extern Void printKinds ( FILE *,Kinds );
48 extern Void printFD ( FILE *,Pair );
50 /*-------------------------------------------------------------------------*/