diff options
author | davve <davve@dtek.chalmers.se> | 2006-07-23 18:22:43 +0000 |
---|---|---|
committer | davve <davve@dtek.chalmers.se> | 2006-07-23 18:22:43 +0000 |
commit | 75a917a29115da1fcc70aec243c36597ad2a63c8 (patch) | |
tree | 825836368d1a03d4ee3c4d2b314e8a16684dfb0a /src/HaddockUtil.hs | |
parent | de580ba29f412239c2f922e9bd67eea2ccdd8bc7 (diff) |
More work on pass1 -- mostly done
Diffstat (limited to 'src/HaddockUtil.hs')
-rw-r--r-- | src/HaddockUtil.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/HaddockUtil.hs b/src/HaddockUtil.hs index 92d81ff6..35290c27 100644 --- a/src/HaddockUtil.hs +++ b/src/HaddockUtil.hs @@ -145,14 +145,14 @@ addConDocs (x:xs) doc = addConDoc x doc : xs restrictTo :: [GHC.Name] -> (GHC.HsDecl GHC.Name) -> (GHC.HsDecl GHC.Name) restrictTo names decl = case decl of - GHC.TyClD d | GHC.isDataDecl d && GHC.tcdND d == GHC.DataType -> - GHC.TyClD (d { GHC.tcdCons = restrictCons names (GHC.tcdCons d) }) - GHC.TyClD d | GHC.isDataDecl d && GHC.tcdND d == GHC.NewType -> + 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 -> case restrictCons names (GHC.tcdCons d) of - [] -> GHC.TyClD (d { GHC.tcdND = GHC.DataType, GHC.tcdCons = [] }) - [con] -> GHC.TyClD (d { GHC.tcdCons = [con] }) - GHC.TyClD d | GHC.isClassDecl d -> - GHC.TyClD (d { GHC.tcdSigs = restrictDecls names (GHC.tcdSigs d) }) + [] -> GHC.TyClD (d { GHC.tcdND = GHC.DataType, GHC.tcdCons = [] }) doc + [con] -> GHC.TyClD (d { GHC.tcdCons = [con] }) doc + GHC.TyClD d doc | GHC.isClassDecl d -> + GHC.TyClD (d { GHC.tcdSigs = restrictDecls names (GHC.tcdSigs d) }) doc _ -> decl restrictCons :: [GHC.Name] -> [GHC.LConDecl GHC.Name] -> [GHC.LConDecl GHC.Name] |