Avoid panic due to partial ieName
authorEric Seidel <gridaphobe@gmail.com>
Wed, 2 Dec 2015 20:37:21 +0000 (14:37 -0600)
committerAustin Seipp <austin@well-typed.com>
Wed, 2 Dec 2015 20:38:58 +0000 (14:38 -0600)
commita12e47bed74e305b37e68014c52feba3dd075514
tree197e6cd47d6b3b97a10f32c64e70b334263b3bb7
parentd4d54b463ef73a577054e9ed1dfce5044072bce7
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
compiler/typecheck/TcHsSyn.hs
testsuite/tests/warnings/should_compile/T11077.hs [new file with mode: 0644]
testsuite/tests/warnings/should_compile/T11077.stderr [new file with mode: 0644]
testsuite/tests/warnings/should_compile/all.T