[project @ 2001-01-17 15:11:04 by simonmar]
[ghc-hetmet.git] / ghc / interpreter / errors.h
1
2 /* --------------------------------------------------------------------------
3  * Error handling support functions
4  *
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.
10  *
11  * $RCSfile: errors.h,v $
12  * $Revision: 1.9 $
13  * $Date: 2000/03/24 14:32:03 $
14  * ------------------------------------------------------------------------*/
15
16 extern Void internal     ( String) HUGS_noreturn;
17 extern Void fatal        ( String) HUGS_noreturn;
18
19 #define Hilite()         doNothing()
20 #define Lolite()         doNothing()
21 #define errorStream      stdout
22
23 #define ERRMSG(l)        Hilite(); errHead(l); FPrintf(errorStream,
24 #define EEND             ); Lolite(); errFail()
25 #define EEND_NO_LONGJMP  ); Lolite(); errFail_no_longjmp()
26 #define ETHEN            );
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()
35
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 );
41
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 );
49
50 /*-------------------------------------------------------------------------*/