diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2020-09-14 12:53:21 +1000 |
---|---|---|
committer | Josh Meredith <joshmeredith2008@gmail.com> | 2020-09-14 12:53:21 +1000 |
commit | a04562f88c594817ad98cdf9aa38e24d6c0ed0ea (patch) | |
tree | f5eacb6848f77f4c685571cfc420e5e363f3c521 /compiler/iface/LoadIface.hs | |
parent | 29204b1c4f52ea34d84da33593052ee839293bf2 (diff) | |
download | haskell-wip/coreField8102.tar.gz |
Patch commit for haskell.nix 8.10.2 core interface fieldwip/coreField8102
Diffstat (limited to 'compiler/iface/LoadIface.hs')
-rw-r--r-- | compiler/iface/LoadIface.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs index 8d327e528d..06cdb90800 100644 --- a/compiler/iface/LoadIface.hs +++ b/compiler/iface/LoadIface.hs @@ -48,6 +48,7 @@ import HscTypes import BasicTypes hiding (SuccessFlag(..)) import TcRnMonad +import Binary ( BinData(..) ) import Constants import PrelNames import PrelInfo @@ -83,6 +84,7 @@ import Plugins import Control.Monad import Control.Exception import Data.IORef +import Data.Map ( toList ) import System.FilePath {- @@ -1155,6 +1157,7 @@ pprModIface iface@ModIface{ mi_final_exts = exts } , text "module header:" $$ nest 2 (ppr (mi_doc_hdr iface)) , text "declaration docs:" $$ nest 2 (ppr (mi_decl_docs iface)) , text "arg docs:" $$ nest 2 (ppr (mi_arg_docs iface)) + , text "extensible fields:" $$ nest 2 (pprExtensibleFields (mi_ext_fields iface)) ] where pp_hsc_src HsBootFile = text "[boot]" @@ -1244,6 +1247,11 @@ pprIfaceAnnotation :: IfaceAnnotation -> SDoc pprIfaceAnnotation (IfaceAnnotation { ifAnnotatedTarget = target, ifAnnotatedValue = serialized }) = ppr target <+> text "annotated by" <+> ppr serialized +pprExtensibleFields :: ExtensibleFields -> SDoc +pprExtensibleFields (ExtensibleFields fs) = vcat . map pprField $ toList fs + where + pprField (name, (BinData size _data)) = text name <+> text "-" <+> ppr size <+> text "bytes" + {- ********************************************************* * * |