diff options
author | Adam Gundry <adam@well-typed.com> | 2014-04-22 02:12:03 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-04-22 06:16:50 -0500 |
commit | fe77cbf15dd44bb72943357d65bd8adf9f4deee5 (patch) | |
tree | 04724d7fcf4b2696d2342c5b31c1f59ebaa92cb1 /compiler/iface/LoadIface.lhs | |
parent | 33e585d6eacae19e83862a05b650373b536095fa (diff) | |
download | haskell-wip/orf.tar.gz |
ghc: implement OverloadedRecordFieldswip/orf
This fully implements the new ORF extension, developed during the Google
Summer of Code 2013, and as described on the wiki:
https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields
This also updates the Haddock submodule.
Reviewed-by: Simon Peyton Jones <simonpj@microsoft.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/iface/LoadIface.lhs')
-rw-r--r-- | compiler/iface/LoadIface.lhs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs index d787794326..6ac7dde010 100644 --- a/compiler/iface/LoadIface.lhs +++ b/compiler/iface/LoadIface.lhs @@ -772,14 +772,17 @@ When printing export lists, we print like this: \begin{code} pprExport :: IfaceExport -> SDoc -pprExport (Avail n) = ppr n -pprExport (AvailTC _ []) = empty -pprExport (AvailTC n (n':ns)) - | n==n' = ppr n <> pp_export ns - | otherwise = ppr n <> char '|' <> pp_export (n':ns) - where - pp_export [] = empty - pp_export names = braces (hsep (map ppr names)) +pprExport (Avail n) = ppr n +pprExport (AvailTC _ [] []) = empty +pprExport (AvailTC n (n':ns) fs) + | n==n' = ppr n <> pp_export ns fs + | otherwise = ppr n <> char '|' <> pp_export (n':ns) fs +pprExport (AvailTC n [] fs) = ppr n <> char '|' <> pp_export [] fs + +pp_export :: [Name] -> AvailFields -> SDoc +pp_export [] [] = empty +pp_export names fs = braces (hsep (map ppr names ++ map pprAvailField fs)) + pprUsage :: Usage -> SDoc pprUsage usage@UsagePackageModule{} |