summaryrefslogtreecommitdiff
path: root/ghc/compiler/utils/PprStyle.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/compiler/utils/PprStyle.lhs')
-rw-r--r--ghc/compiler/utils/PprStyle.lhs9
1 files changed, 6 insertions, 3 deletions
diff --git a/ghc/compiler/utils/PprStyle.lhs b/ghc/compiler/utils/PprStyle.lhs
index b8ee2ed8ea..dfb4ec27ad 100644
--- a/ghc/compiler/utils/PprStyle.lhs
+++ b/ghc/compiler/utils/PprStyle.lhs
@@ -8,7 +8,7 @@
module PprStyle (
PprStyle(..),
- codeStyle,
+ codeStyle, ifaceStyle,
showUserishTypes
) where
@@ -39,19 +39,22 @@ style). The most likely ones are variations on how much type info is
shown.
The following test decides whether or not we are actually generating
-code (either C or assembly).
+code (either C or assembly), or generating interface files.
\begin{code}
codeStyle :: PprStyle -> Bool
codeStyle PprForC = True
codeStyle (PprForAsm _ _) = True
codeStyle _ = False
+
+ifaceStyle :: PprStyle -> Bool
+ifaceStyle PprInterface = True
+ifaceStyle other = False
\end{code}
\begin{code}
-- True means types like (Eq a, Text b) => a -> b
-- False means types like _forall_ a b => Eq a -> Text b -> a -> b
showUserishTypes PprForUser = True
-showUserishTypes PprInterface = True
showUserishTypes other = False
\end{code}