diff options
author | Simon Hengel <sol@typeful.net> | 2012-05-16 17:43:49 +0200 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2012-05-17 19:08:20 +0200 |
commit | 986ff3c5b2e4e519171816c3ad6caa81d4808919 (patch) | |
tree | 6466e04656707ee6ad98acc6b56e60399912b755 /src/Haddock/Backends/LaTeX.hs | |
parent | 15aa68da3523a56475298d91f288587c4744de4a (diff) |
Use >>= instead of fmap and join
Diffstat (limited to 'src/Haddock/Backends/LaTeX.hs')
-rw-r--r-- | src/Haddock/Backends/LaTeX.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs index ffe507ab..efe05b9e 100644 --- a/src/Haddock/Backends/LaTeX.hs +++ b/src/Haddock/Backends/LaTeX.hs @@ -642,8 +642,7 @@ ppSideBySideConstr subdocs unicode leader (L _ con) = forall = con_explicit con -- don't use "con_doc con", in case it's reconstructed from a .hi file, -- or also because we want Haddock to do the doc-parsing, not GHC. - -- 'join' is in Maybe. - mbDoc = join $ fmap fst $ lookup (unLoc $ con_name con) subdocs + mbDoc = lookup (unLoc $ con_name con) subdocs >>= fst mkFunTy a b = noLoc (HsFunTy a b) @@ -653,7 +652,7 @@ ppSideBySideField subdocs unicode (ConDeclField (L _ name) ltype _) = <+> dcolon unicode <+> ppLType unicode ltype) <-> rDoc mbDoc where -- don't use cd_fld_doc for same reason we don't use con_doc above - mbDoc = join $ fmap fst $ lookup name subdocs + mbDoc = lookup name subdocs >>= fst -- {- -- ppHsFullConstr :: HsConDecl -> LaTeX |