diff options
author | simonmar <unknown> | 2001-08-16 10:25:21 +0000 |
---|---|---|
committer | simonmar <unknown> | 2001-08-16 10:25:21 +0000 |
commit | a035c70f3f5606672be0534e3cf268e9d81f8a8e (patch) | |
tree | 47bcf1ef99e15d18ec8885fa76cb00956aa762ba /ghc/compiler/hsSyn/HsDecls.lhs | |
parent | ef32ff0a45ff6af2018254fd4de5f657bea63385 (diff) | |
download | haskell-a035c70f3f5606672be0534e3cf268e9d81f8a8e.tar.gz |
[project @ 2001-08-16 10:25:21 by simonmar]
Prettier output for GHCi's :info
- put parenthesis around operators in type signatures
(both IfaceSig and ClassOpSig)
- don't use the cryptic '= ::' notation for indicating that a
class op has a default method, instead put the information in a
comment after the type.
Diffstat (limited to 'ghc/compiler/hsSyn/HsDecls.lhs')
-rw-r--r-- | ghc/compiler/hsSyn/HsDecls.lhs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ghc/compiler/hsSyn/HsDecls.lhs b/ghc/compiler/hsSyn/HsDecls.lhs index 5be8245edc..6f06cd81bc 100644 --- a/ghc/compiler/hsSyn/HsDecls.lhs +++ b/ghc/compiler/hsSyn/HsDecls.lhs @@ -26,6 +26,7 @@ module HsDecls ( -- friends: import HsBinds ( HsBinds, MonoBinds, Sig(..), FixitySig(..) ) import HsExpr ( HsExpr ) +import HsImpExp ( ppr_var ) import HsTypes import PprCore ( pprCoreRule ) import HsCore ( UfExpr, UfBinder, HsIdInfo, pprHsIdInfo, @@ -456,7 +457,10 @@ instance (NamedThing name, Outputable name, Outputable pat) => Outputable (TyClDecl name pat) where ppr (IfaceSig {tcdName = var, tcdType = ty, tcdIdInfo = info}) - = hsep [ppr var, dcolon, ppr ty, pprHsIdInfo info] + = getPprStyle $ \ sty -> + hsep [ if ifaceStyle sty then ppr var else ppr_var var, + dcolon, ppr ty, pprHsIdInfo info + ] ppr (ForeignType {tcdName = tycon}) = hsep [ptext SLIT("foreign import type dotnet"), ppr tycon] |