Add NOINLINE for hs-boot functions
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 20 Jul 2015 15:18:05 +0000 (16:18 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 21 Jul 2015 13:21:40 +0000 (14:21 +0100)
commitefa7b3a474bc373201ab145c129262a73c86f959
tree1fcc99378ad4a86b98ab91c770e9325058c79476
parent3c44a46b352a4eb7ff72eb3aa5495b25dee8351f
Add NOINLINE for hs-boot functions

This fixes Trac #10083.

The key change is in TcBinds.tcValBinds, where we construct
the prag_fn.  With this patch we add a NOINLINE pragma for
any functions that were exported by the hs-boot file for this
module.

See Note [Inlining and hs-boot files], and #10083, for details.

The commit touches several other files becuase I also changed the
representation of the "pragma function" from a function TcPragFun
to an environment, TcPragEnv. This makes it easer to extend
during construction.
compiler/typecheck/TcBinds.hs
compiler/typecheck/TcClassDcl.hs
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcPat.hs
compiler/typecheck/TcPatSyn.hs
testsuite/tests/simplCore/should_compile/Makefile
testsuite/tests/simplCore/should_compile/T10083.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/T10083.hs-boot [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/T10083a.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T