<div dir="ltr"><div><div><div>Hello,<br><br></div>While compiling the `record` package with ghc-8 rc3 with `stack build`, the memory usage went above 6gb and started trashing. But when `stack build --fast` (-O0) was being used the package compiled with maximum memory at 1.8gb. <br><br>Also `stack build` works fine with ghc-7.10.3 with the build taking about 1.7gb. Attached is the stack file to reproduce the issue.<br><br></div><div>Steps to reproduce:<br></div><div>1. Create a new directory and put the attached stack.yaml there.<br></div><div>2. run `stack build` - this will thrash after some time<br></div>3. run `stack build --fast` - this will succeed<br></div>4. run `stack build --resolver=ghc-7.10.3` - this will succeed as well<br><div><div><div> <br></div></div></div></div>