aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockUtil.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/HaddockUtil.hs')
-rw-r--r--src/HaddockUtil.hs4
1 files changed, 2 insertions, 2 deletions
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 ->