diff options
author | Alexander Biehl <abiehl@novomind.com> | 2018-02-19 10:03:50 +0100 |
---|---|---|
committer | Alexander Biehl <abiehl@novomind.com> | 2018-02-19 10:04:34 +0100 |
commit | d66092ee99639de628dbc4fce8a9936875f47d8c (patch) | |
tree | 035fe997e210e6500a036b200cd967824c4b848b /haddock-api/src/Haddock/Backends/LaTeX.hs | |
parent | 6d62c5b79d0f3ce975c087b5176ee53d62122d86 (diff) |
Hoogle/Latex: Remove use of partial function
Diffstat (limited to 'haddock-api/src/Haddock/Backends/LaTeX.hs')
-rw-r--r-- | haddock-api/src/Haddock/Backends/LaTeX.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs index 3ac3b405..1043453d 100644 --- a/haddock-api/src/Haddock/Backends/LaTeX.hs +++ b/haddock-api/src/Haddock/Backends/LaTeX.hs @@ -508,13 +508,11 @@ ppClassDecl instances loc doc subdocs methodTable = text "\\haddockpremethods{}\\textbf{Methods}" $$ - vcat [ ppFunSig loc doc names (hsSigWcType typ) unicode + vcat [ ppFunSig loc doc [name] (hsSigWcType typ) unicode | L _ (TypeSig lnames typ) <- lsigs - , let doc = lookupAnySubdoc (head names) subdocs - names = map unLoc lnames ] - -- FIXME: is taking just the first name ok? Is it possible that - -- there are different subdocs for different names in a single - -- type signature? + , name <- map unLoc lnames + , let doc = lookupAnySubdoc name subdocs + ] instancesBit = ppDocInstances unicode instances |