X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fmain%2FPprTyThing.hs;h=86c6f4c3d9720711c3efca9fc8318a63bd40cdfb;hp=025004f805bd31bace2b7d1001d583dd982493c8;hb=940524aec90652b5ef81789c9a453c57c0e42cc9;hpb=485b80f9c422e49a441ec0b175c39799630171da diff --git a/compiler/main/PprTyThing.hs b/compiler/main/PprTyThing.hs index 025004f..86c6f4c 100644 --- a/compiler/main/PprTyThing.hs +++ b/compiler/main/PprTyThing.hs @@ -20,7 +20,7 @@ import qualified GHC import TyCon ( tyConFamInst_maybe ) import Type ( pprTypeApp ) -import GHC ( TyThing(..), SrcLoc ) +import GHC ( TyThing(..), SrcSpan ) import Outputable -- ----------------------------------------------------------------------------- @@ -33,7 +33,7 @@ import Outputable pprTyThingLoc :: Bool -> TyThing -> SDoc pprTyThingLoc exts tyThing = showWithLoc loc (pprTyThing exts tyThing) - where loc = GHC.nameSrcLoc (GHC.getName tyThing) + where loc = GHC.nameSrcSpan (GHC.getName tyThing) -- | Pretty-prints a 'TyThing'. pprTyThing :: Bool -> TyThing -> SDoc @@ -46,7 +46,7 @@ pprTyThing exts (AClass cls) = pprClass exts cls pprTyThingInContextLoc :: Bool -> TyThing -> SDoc pprTyThingInContextLoc exts tyThing = showWithLoc loc (pprTyThingInContext exts tyThing) - where loc = GHC.nameSrcLoc (GHC.getName tyThing) + where loc = GHC.nameSrcSpan (GHC.getName tyThing) -- | Pretty-prints a 'TyThing' in context: that is, if the entity -- is a data constructor, record selector, or class method, then @@ -228,7 +228,7 @@ add_bars (c:cs) = sep ((equals <+> c) : map (char '|' <+>) cs) ppr_bndr :: GHC.NamedThing a => a -> SDoc ppr_bndr a = GHC.pprParenSymName a -showWithLoc :: SrcLoc -> SDoc -> SDoc +showWithLoc :: SrcSpan -> SDoc -> SDoc showWithLoc loc doc = hang doc 2 (char '\t' <> comment <+> GHC.pprDefnLoc loc) -- The tab tries to make them line up a bit