Fix #14888 by adding more special cases for ArrowT
authorRyan Scott <ryan.gl.scott@gmail.com>
Mon, 5 Mar 2018 13:57:04 +0000 (08:57 -0500)
committerRyan Scott <ryan.gl.scott@gmail.com>
Mon, 5 Mar 2018 13:57:04 +0000 (08:57 -0500)
commit6ee831f279c91888ee5815f8eee473bcd6fd25c6
tree3489ba2f34132d85b6e43046f7db7ce2854fa404
parent3d252037234ce48f9bdada7d5c9b1d8eba470829
Fix #14888 by adding more special cases for ArrowT

Summary:
There were previously some situations where `(->)` would
not be desugared or reified as `ArrowT`, leading to various oddities
such as those observed in #14888. We now uniformly treat `(->)` as
`ArrowT` in Template Haskell–world by checking for any tycon that
has the same name as `(->)`, and converting that to `ArrowT`.

Test Plan: make test TEST=T14888

Reviewers: goldfire, bgamari, simonpj

Reviewed By: goldfire, simonpj

Subscribers: simonpj, rwbarton, thomie, carter

GHC Trac Issues: #14888

Differential Revision: https://phabricator.haskell.org/D4466
compiler/deSugar/DsMeta.hs
compiler/typecheck/TcSplice.hs
testsuite/tests/th/T14888.hs [new file with mode: 0644]
testsuite/tests/th/T14888.stderr [new file with mode: 0644]
testsuite/tests/th/all.T