diff options
author | Adam Gundry <adam@well-typed.com> | 2015-10-16 16:26:42 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2015-12-14 15:20:48 +0000 |
commit | 821b1dcfe62bf75711661348ac80a64cc60a0b6a (patch) | |
tree | f98f58895974c528e52ac27c156589d7a1b2ad90 /haddock-api/src/Haddock/Backends/Hoogle.hs | |
parent | 319acdd0c70d21c517aa09b3e35f87e9bc01ad8c (diff) |
Roughly fix up haddock for DuplicateRecordFields changes
This compiles, but will probably need more work to produce good
documentation when the DuplicateRecordFields extension is used.
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Hoogle.hs')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Hoogle.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs index f6ad9808..42887834 100644 --- a/haddock-api/src/Haddock/Backends/Hoogle.hs +++ b/haddock-api/src/Haddock/Backends/Hoogle.hs @@ -245,8 +245,8 @@ ppCtor dflags dat subdocs con f (PrefixCon args) = [typeSig name $ args ++ [resType]] f (InfixCon a1 a2) = f $ PrefixCon [a1,a2] f (RecCon (L _ recs)) = f (PrefixCon $ map cd_fld_type (map unLoc recs)) ++ concat - [(concatMap (lookupCon dflags subdocs) (cd_fld_names r)) ++ - [out dflags (map unL $ cd_fld_names r) `typeSig` [resType, cd_fld_type r]] + [(concatMap (lookupCon dflags subdocs . noLoc . selectorFieldOcc . unLoc) (cd_fld_names r)) ++ + [out dflags (map (selectorFieldOcc . unLoc) $ cd_fld_names r) `typeSig` [resType, cd_fld_type r]] | r <- map unLoc recs] funs = foldr1 (\x y -> reL $ HsFunTy (makeExplicitL x) (makeExplicitL y)) |