From 82a5bcbb729d769a53e9c14b0be9c9b6b8daa548 Mon Sep 17 00:00:00 2001 From: davve Date: Sat, 29 Jul 2006 16:16:43 +0000 Subject: Add instances, build renaming environment, start on the renamer --- src/HaddockUtil.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/HaddockUtil.hs') diff --git a/src/HaddockUtil.hs b/src/HaddockUtil.hs index 35290c27..7ce16cd3 100644 --- a/src/HaddockUtil.hs +++ b/src/HaddockUtil.hs @@ -143,8 +143,8 @@ addConDocs (x:xs) doc = addConDoc x doc : xs -- --------------------------------------------------------------------------- -- Making abstract declarations -restrictTo :: [GHC.Name] -> (GHC.HsDecl GHC.Name) -> (GHC.HsDecl GHC.Name) -restrictTo names decl = case decl of +restrictTo :: [GHC.Name] -> (GHC.LHsDecl GHC.Name) -> (GHC.LHsDecl GHC.Name) +restrictTo names (L loc decl) = L loc $ case decl of GHC.TyClD d doc | GHC.isDataDecl d && GHC.tcdND d == GHC.DataType -> GHC.TyClD (d { GHC.tcdCons = restrictCons names (GHC.tcdCons d) }) doc GHC.TyClD d doc | GHC.isDataDecl d && GHC.tcdND d == GHC.NewType -> -- cgit v1.2.3