diff options
author | Ian Lynagh <igloo@earth.li> | 2012-02-21 19:19:55 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-02-21 19:19:55 +0000 |
commit | 4082460e01b81b48614c70876f6ce9b7820f39eb (patch) | |
tree | 180a2105e629fa57f64f74f27d97fe511f317048 /compiler/prelude/ForeignCall.lhs | |
parent | 40cb7f14dba9ba5aa0532dc56d941d318eaae906 (diff) | |
download | haskell-4082460e01b81b48614c70876f6ce9b7820f39eb.tar.gz |
Show the CType in --show-iface output
Diffstat (limited to 'compiler/prelude/ForeignCall.lhs')
-rw-r--r-- | compiler/prelude/ForeignCall.lhs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/prelude/ForeignCall.lhs b/compiler/prelude/ForeignCall.lhs index 0a8db5c5a5..b245e8314a 100644 --- a/compiler/prelude/ForeignCall.lhs +++ b/compiler/prelude/ForeignCall.lhs @@ -234,10 +234,19 @@ instance Outputable CCallSpec where newtype Header = Header FastString deriving (Eq, Data, Typeable) +instance Outputable Header where + ppr (Header h) = quotes $ ppr h + -- | A C type, used in CAPI FFI calls data CType = CType (Maybe Header) -- header to include for this type FastString -- the type itself deriving (Data, Typeable) + +instance Outputable CType where + ppr (CType mh ct) = hDoc <+> ftext ct + where hDoc = case mh of + Nothing -> empty + Just h -> ppr h \end{code} |