Dump core of base

How does one go about using -ddump-simpl -dsuppress-all -ddump-to-file (or variations of this) when building base? I've got some strong suspicions that that are arguments to event manager functions that are morally strict that go unnoticed by demand analysis. However, I need to dump base's core to confirm this. -- -Andrew Thaddeus Martin

I don't happen to know the answer to your question, but when hacking on
base, you can often get the job done much faster by copying the necessary
source files somewhere else and renaming modules as necessary. Recompiling
base is a pain and a half.
On Wed, Dec 19, 2018 at 2:26 PM Andrew Martin
How does one go about using -ddump-simpl -dsuppress-all -ddump-to-file (or variations of this) when building base? I've got some strong suspicions that that are arguments to event manager functions that are morally strict that go unnoticed by demand analysis. However, I need to dump base's core to confirm this.
-- -Andrew Thaddeus Martin _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

Looking at the doc/user-setting.md file for Hadrian, I would guess the
following.
https://github.com/ghc/ghc/blob/master/hadrian/doc/user-settings.md
1. Copy hadrian/src/UserSettings.hs to hadrian/UserSetting.hs
2. Define
```
dumpArgs = userArgs = builder Ghc ? package base ? arg "-ddump-simpl
-ddump-to-file -ddump-dir=foo"
```
3. Create a build flavour something like
userFlavour = quickestFlavour { name = "user", args = (args
quickestFlavour) <> dumpArgs }
4. Compile with `./hadrian.sh -j --flavour=user`
On Wed, Dec 19, 2018 at 7:33 PM David Feuer
I don't happen to know the answer to your question, but when hacking on base, you can often get the job done much faster by copying the necessary source files somewhere else and renaming modules as necessary. Recompiling base is a pain and a half.
On Wed, Dec 19, 2018 at 2:26 PM Andrew Martin
wrote: How does one go about using -ddump-simpl -dsuppress-all -ddump-to-file (or variations of this) when building base? I've got some strong suspicions that that are arguments to event manager functions that are morally strict that go unnoticed by demand analysis. However, I need to dump base's core to confirm this.
-- -Andrew Thaddeus Martin _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

On Dec 19, 2018, at 2:25 PM, Andrew Martin
wrote: How does one go about using -ddump-simpl -dsuppress-all -ddump-to-file (or variations of this) when building base?
Add a line like GhcLibHcOpts += -ddump-simpl -dsuppress-all -ddump-to-file at the end of your build.mk. You can see other similar options in the files in the flavours subdirectory of the mk directory. I hope this helps! Richard

Awesome, thanks! That's good to know.
On Wed, Dec 19, 2018 at 3:08 PM Richard Eisenberg
On Dec 19, 2018, at 2:25 PM, Andrew Martin
wrote: How does one go about using -ddump-simpl -dsuppress-all -ddump-to-file (or variations of this) when building base?
Add a line like
GhcLibHcOpts += -ddump-simpl -dsuppress-all -ddump-to-file
at the end of your build.mk. You can see other similar options in the files in the flavours subdirectory of the mk directory.
I hope this helps! Richard
-- -Andrew Thaddeus Martin

cool!
please do share if you can construct a scenario/usage where the thunkery
becomes the bottleneck!
On Wed, Dec 19, 2018 at 3:19 PM Andrew Martin
Awesome, thanks! That's good to know.
On Wed, Dec 19, 2018 at 3:08 PM Richard Eisenberg
wrote: On Dec 19, 2018, at 2:25 PM, Andrew Martin
wrote: How does one go about using -ddump-simpl -dsuppress-all -ddump-to-file (or variations of this) when building base?
Add a line like
GhcLibHcOpts += -ddump-simpl -dsuppress-all -ddump-to-file
at the end of your build.mk. You can see other similar options in the files in the flavours subdirectory of the mk directory.
I hope this helps! Richard
-- -Andrew Thaddeus Martin _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
participants (5)
-
Andrew Martin
-
Carter Schonwald
-
David Feuer
-
Matthew Pickering
-
Richard Eisenberg