diff options
author | simonmar <unknown> | 2004-03-25 09:35:14 +0000 |
---|---|---|
committer | simonmar <unknown> | 2004-03-25 09:35:14 +0000 |
commit | 6a8575c78baee0e16c612ddb6fb56267236fa743 (patch) | |
tree | 6642b8eb9b9796ce6a354e6204dfcbf8edd9372d /src | |
parent | 2600efa4eace203a975fd784655148d6fc783de2 (diff) |
[haddock @ 2004-03-25 09:35:14 by simonmar]
restrictTo: fix for restricting a newtype with a record field.
Diffstat (limited to 'src')
-rw-r--r-- | src/HaddockUtil.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/HaddockUtil.hs b/src/HaddockUtil.hs index a4248e81..ce22ee24 100644 --- a/src/HaddockUtil.hs +++ b/src/HaddockUtil.hs @@ -140,8 +140,9 @@ restrictTo names decl = case decl of HsDataDecl loc ctxt n xs (restrictCons names cons) drv doc decl@(HsNewTypeDecl loc ctxt n xs con drv doc) -> case restrictCons names [con] of - [] -> HsDataDecl loc ctxt n xs [] drv doc - _ -> decl + [] -> HsDataDecl loc ctxt n xs [] drv doc + [con'] -> HsNewTypeDecl loc ctxt n xs con' drv doc + -- an abstract newtype decl appears as a data decl. HsClassDecl loc ctxt n tys fds decls doc -> HsClassDecl loc ctxt n tys fds (restrictDecls names decls) doc _ -> decl |