2 % (c) The AQUA Project, Glasgow University, 1996
4 \section[PprStyle]{Pretty-printing `styles'}
7 #include "HsVersions.h"
15 CHK_Ubiq() -- debugging consistency check
18 = PprForUser -- Pretty-print in a way that will
19 -- make sense to the ordinary user;
20 -- must be very close to Haskell
21 -- syntax, etc. ToDo: how diff is
22 -- this from what pprInterface must
24 | PprDebug -- Standard debugging output
25 | PprShowAll -- Debugging output which leaves
26 -- nothing to the imagination
27 | PprInterface -- Interface generation
28 | PprForC -- must print out C-acceptable names
29 | PprUnfolding -- for non-interface intermodule info
30 -- the compiler writes/reads
31 | PprForAsm -- must print out assembler-acceptable names
32 Bool -- prefix CLabel with underscore?
33 (String -> String) -- format AsmTempLabel
36 Orthogonal to the above printing styles are (possibly) some
37 command-line flags that affect printing (often carried with the
38 style). The most likely ones are variations on how much type info is
41 The following test decides whether or not we are actually generating
42 code (either C or assembly).
44 codeStyle :: PprStyle -> Bool
46 codeStyle PprForC = True
47 codeStyle (PprForAsm _ _) = True
52 -- True means types like (Eq a, Text b) => a -> b
53 -- False means types like _forall_ a b => Eq a -> Text b -> a -> b
54 showUserishTypes PprForUser = True
55 showUserishTypes PprInterface = True
56 showUserishTypes other = False