Dump core of base

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Dump core of base

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
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Dump core of base

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 <[hidden email]> 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
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Dump core of base

Matthew Pickering
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 <[hidden email]> wrote:

>
> 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 <[hidden email]> 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
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Dump core of base

Richard Eisenberg-4
In reply to this post by Andrew Martin


On Dec 19, 2018, at 2:25 PM, Andrew Martin <[hidden email]> 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


_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Dump core of base

Andrew Martin
Awesome, thanks! That's good to know.

On Wed, Dec 19, 2018 at 3:08 PM Richard Eisenberg <[hidden email]> wrote:


On Dec 19, 2018, at 2:25 PM, Andrew Martin <[hidden email]> 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
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Dump core of base

Carter Schonwald
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 <[hidden email]> wrote:
Awesome, thanks! That's good to know.

On Wed, Dec 19, 2018 at 3:08 PM Richard Eisenberg <[hidden email]> wrote:


On Dec 19, 2018, at 2:25 PM, Andrew Martin <[hidden email]> 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
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries