summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorEric Seidel <gridaphobe@gmail.com>2015-12-02 14:37:21 -0600
committerAustin Seipp <austin@well-typed.com>2015-12-02 14:38:58 -0600
commita12e47bed74e305b37e68014c52feba3dd075514 (patch)
tree197e6cd47d6b3b97a10f32c64e70b334263b3bb7 /compiler
parentd4d54b463ef73a577054e9ed1dfce5044072bce7 (diff)
downloadhaskell-a12e47bed74e305b37e68014c52feba3dd075514.tar.gz
Avoid panic due to partial ieName
HsImpExp.ieName is partial and fails when given e.g. `module X` solution: use ieNames instead which returns a list of names instead of a single name. Reviewed By: bgamari, austin Differential Revision: https://phabricator.haskell.org/D1551 GHC Trac Issues: #11077
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcHsSyn.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs
index ae095e0da3..39e7f2d5da 100644
--- a/compiler/typecheck/TcHsSyn.hs
+++ b/compiler/typecheck/TcHsSyn.hs
@@ -317,7 +317,7 @@ zonkTopDecls ev_binds binds export_ies sig_ns rules vects imp_specs fords
; warn_missing_sigs <- woptM Opt_WarnMissingSigs
; warn_only_exported <- woptM Opt_WarnMissingExportedSigs
; let export_occs = maybe emptyBag
- (listToBag . map (rdrNameOcc . ieName . unLoc) . unLoc)
+ (listToBag . concatMap (map rdrNameOcc . ieNames . unLoc) . unLoc)
export_ies
sig_warn
| warn_only_exported = topSigWarnIfExported export_occs sig_ns