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/15 23:27:16 $
14 * ------------------------------------------------------------------------*/
16 extern Void internal ( String) HUGS_noreturn;
17 extern Void fatal ( String) HUGS_noreturn;
20 #define Hilite() WinTextcolor(hWndText,RED);
21 #define Lolite() WinTextcolor(hWndText,BLACK);
22 #define errorStream stderr
24 #define Hilite() doNothing()
25 #define Lolite() doNothing()
26 #define errorStream stdout
29 #define ERRMSG(l) Hilite(); errHead(l); FPrintf(errorStream,
30 #define EEND ); Lolite(); errFail()
32 #define ERRTEXT Hilite(); FPrintf(errorStream,
33 #define ERREXPR(e) Hilite(); printExp(errorStream,e); Lolite()
34 #define ERRTYPE(e) Hilite(); printType(errorStream,e); Lolite()
35 #define ERRCONTEXT(qs) Hilite(); printContext(errorStream,qs); Lolite()
36 #define ERRPRED(pi) Hilite(); printPred(errorStream,pi); Lolite()
37 #define ERRKIND(k) Hilite(); printKind(errorStream,k); Lolite()
38 #define ERRKINDS(ks) Hilite(); printKinds(errorStream,ks); Lolite()
39 #define ERRFD(fd) Hilite(); printFD(errorStream,fd); Lolite()
41 extern Void errHead ( Int ); /* in main.c */
42 extern Void errFail ( Void) HUGS_noreturn;
43 extern Void errAbort ( Void );
44 extern Cell errAssert ( Int );
46 extern sigProto(breakHandler);
48 extern Bool breakOn ( Bool ); /* in machdep.c */
50 extern Void printExp ( FILE *,Cell ); /* in output.c */
51 extern Void printType ( FILE *,Cell );
52 extern Void printContext ( FILE *,List );
53 extern Void printPred ( FILE *,Cell );
54 extern Void printKind ( FILE *,Kind );
55 extern Void printKinds ( FILE *,Kinds );
56 extern Void printFD ( FILE *,Pair );
58 /*-------------------------------------------------------------------------*/