Avoid find_tycon panic if datacon is not in scope
authorAdam Gundry <adam@well-typed.com>
Sat, 17 Dec 2016 02:44:45 +0000 (02:44 +0000)
committerClint Adams <clint@debian.org>
Sat, 17 Dec 2016 02:44:45 +0000 (02:44 +0000)
commit581e45bc96d84d9bbf83a7cd3198ed3749959617
treea806494dc46c40e6b99c933b7a0237985b87e475
parenta27ec152f0b762ad47e6f7450addc1002e9985b7
Avoid find_tycon panic if datacon is not in scope

When using TH to splice expressions involving record field construction,
the parent datacon may not be in scope.  We shouldn't panic about this,
because we will be renaming Exact RdrNames which don't require any
disambiguation.

Reviewers: austin, bgamari
Reviewed By: bgamari
Differential Revision: https://phabricator.haskell.org/D2321
GHC Trac Issues: #12130

Origin: upstream, https://git.haskell.org/ghc.git/commitdiff/694e0f3a08030

Gbp-Pq: Name find-tycon-panic
compiler/rename/RnPat.hs