[commit: haddock] wip/ast-prepare-annotations-final6: Replace head with case/panic (e5c8fda)
git at git.haskell.org
git at git.haskell.org
Wed Jul 8 08:33:44 UTC 2015
- Previous message: [commit: haddock] wip/ast-prepare-annotations-final6: Apply changes to match AST (3361656)
- Next message: [commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, wip/10268, wip/10313, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-ann-hstylit, wip/api-ann-hstylit-1, wip/api-ann-hstylit-2, wip/api-ann-hstylit-3, wip/api-ann-hstylit-4, wip/api-ann-hstylit-5, wip/orf-reboot, wip/trac-9744: Follow API changes in D426 (5d8117d)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Repository : ssh://git@git.haskell.org/haddock
On branch : wip/ast-prepare-annotations-final6
Link : http://git.haskell.org/haddock.git/commitdiff/e5c8fdab729c98527d132f4a68760430e1f59141
>---------------------------------------------------------------
commit e5c8fdab729c98527d132f4a68760430e1f59141
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Tue Nov 18 21:49:28 2014 +0200
Replace head with case/panic
>---------------------------------------------------------------
e5c8fdab729c98527d132f4a68760430e1f59141
src/Haddock/Backends/LaTeX.hs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs
index d7469c9..ec3ea8d 100644
--- a/src/Haddock/Backends/LaTeX.hs
+++ b/src/Haddock/Backends/LaTeX.hs
@@ -26,6 +26,7 @@ import OccName
import Name ( nameOccName )
import RdrName ( rdrNameOcc )
import FastString ( unpackFS, unpackLitString, zString )
+import Outputable ( panic)
import qualified Data.Map as Map
import System.Directory
@@ -676,8 +677,10 @@ 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.
- mbDoc = lookup (unLoc $ head $ con_names con) subdocs >>=
- combineDocumentation . fst
+ mbDoc = case con_names con of
+ [] -> panic "empty con_names"
+ (cn:_) -> lookup (unLoc cn) subdocs >>=
+ combineDocumentation . fst
mkFunTy a b = noLoc (HsFunTy a b)
- Previous message: [commit: haddock] wip/ast-prepare-annotations-final6: Apply changes to match AST (3361656)
- Next message: [commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, wip/10268, wip/10313, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-ann-hstylit, wip/api-ann-hstylit-1, wip/api-ann-hstylit-2, wip/api-ann-hstylit-3, wip/api-ann-hstylit-4, wip/api-ann-hstylit-5, wip/orf-reboot, wip/trac-9744: Follow API changes in D426 (5d8117d)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ghc-commits
mailing list