Treat banged bindings as FunBinds
authorBen Gamari <bgamari.foss@gmail.com>
Mon, 8 May 2017 21:47:19 +0000 (17:47 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 9 May 2017 02:26:41 +0000 (22:26 -0400)
commit372995364c52eef15066132d7d1ea8b6760034e6
tree1b5d39684c0fe65636a43ff67405615abd2ea8c6
parentb99bae6d132e083b73283963be85932596341ddd
Treat banged bindings as FunBinds

This reworks the HsSyn representation to make banged variable patterns
(e.g. !x = e) be represented as FunBinds instead of PatBinds, adding a flag to
FunRhs to record the bang.

Fixes #13594.

Reviewers: austin, goldfire, alanz, simonpj

Reviewed By: simonpj

Subscribers: simonpj, rwbarton, thomie, mpickering

Differential Revision: https://phabricator.haskell.org/D3525
22 files changed:
compiler/deSugar/Check.hs
compiler/deSugar/DsBinds.hs
compiler/deSugar/DsExpr.hs
compiler/hsSyn/Convert.hs
compiler/hsSyn/HsBinds.hs
compiler/hsSyn/HsExpr.hs
compiler/hsSyn/HsUtils.hs
compiler/parser/Parser.y
compiler/parser/RdrHsSyn.hs
compiler/rename/RnBinds.hs
compiler/typecheck/TcGenDeriv.hs
compiler/typecheck/TcGenFunctor.hs
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcMatches.hs
compiler/typecheck/TcPatSyn.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcTyDecls.hs
testsuite/tests/parser/should_compile/DumpParsedAst.stderr
testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
testsuite/tests/parser/should_compile/T13594.hs [new file with mode: 0644]
testsuite/tests/parser/should_compile/all.T