stranal/sigs/UnsatFun

Joachim Breitner mail at joachim-breitner.de
Mon Nov 30 08:59:31 UTC 2015


Hi Richard,

Am Sonntag, den 29.11.2015, 22:16 -0500 schrieb Richard Eisenberg:
> Is there a primer for how to read the output?

there is
https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Demand
which I think is the most up-to-date-description of strictness
signatures. All the papers out there, as far as I know, only cover some
of the aspects of it.

> Or a small function
> that produces the output that I could quickly reverse engineer?

Sorry, not sure what you mean :-|

The pretty-printer for these is in compiler/basicTypes/Demand.hs.

> There is a suggestion to look at the core before and after my patch.
> Is there a certain phase I should look at? What should I look for?

The strictness signature is calculated by the Demand Analyser, so I
think -ddump-stranal is the right one.

> And where in the GHC code base should I start looking to understand
> this better?

Definitely compiler/stranal/DmdAnal.lhs.

> Sorry if these questions seem too easy -- I'm just out of my element
> here. My hunch is that I need to update something in the strictness
> analyzer to look through/around/beyond coercions somewhere. Any ideas
> as to what that might be would be helpful! :)

That’d be my hunch as well, but I’m not sure how to help more – besides
building your branch and tracing through the code myself. If you are
stuck or really do not feel like looking at that code, just should and
I’ll see if I can detect whats wrong. But maybe for that it already
suffices to see the core in both cases somewhere.

Greetings,
Joachim



-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20151130/e81a861c/attachment.sig>


More information about the ghc-devs mailing list