X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FhsSyn%2FHsImpExp.lhs;fp=compiler%2FhsSyn%2FHsImpExp.lhs;h=099537f9d0d7bbc6cff9580d245e7c0882809989;hp=4e58dd71f0da18a284256803ff8b983197131336;hb=1867a7bb8c59ea514b4f47f5434842543933ec9a;hpb=ea9a5be67418ab76c4fa33736a3335b517c9e7f9 diff --git a/compiler/hsSyn/HsImpExp.lhs b/compiler/hsSyn/HsImpExp.lhs index 4e58dd7..099537f 100644 --- a/compiler/hsSyn/HsImpExp.lhs +++ b/compiler/hsSyn/HsImpExp.lhs @@ -35,6 +35,7 @@ type LImportDecl name = Located (ImportDecl name) data ImportDecl name = ImportDecl (Located ModuleName) -- module name + (Maybe FastString) -- package qualifier Bool -- True <=> {-# SOURCE #-} import Bool -- True => qualified (Maybe ModuleName) -- as Module @@ -43,11 +44,14 @@ data ImportDecl name \begin{code} instance (Outputable name) => Outputable (ImportDecl name) where - ppr (ImportDecl mod from qual as spec) + ppr (ImportDecl mod pkg from qual as spec) = hang (hsep [ptext (sLit "import"), ppr_imp from, - pp_qual qual, ppr mod, pp_as as]) + pp_qual qual, pp_pkg pkg, ppr mod, pp_as as]) 4 (pp_spec spec) where + pp_pkg Nothing = empty + pp_pkg (Just p) = doubleQuotes (ftext p) + pp_qual False = empty pp_qual True = ptext (sLit "qualified") @@ -64,7 +68,7 @@ instance (Outputable name) => Outputable (ImportDecl name) where = ptext (sLit "hiding") <+> parens (interpp'SP spec) ideclName :: ImportDecl name -> Located ModuleName -ideclName (ImportDecl mod_nm _ _ _ _) = mod_nm +ideclName (ImportDecl mod_nm _ _ _ _ _) = mod_nm \end{code} %************************************************************************