[Haskell-cafe] Pattern matching desugaring regression? Re: Why does my module take so long to compile?

Sebastian Graf sgraf1337 at gmail.com
Mon Feb 15 18:13:00 UTC 2021


I'm not sure I see all the context of the conversation, but it is entirely
possible that code with many local constraints regresses the pattern-match
checker (which is accounted to Desugaring in the profile emitted by -v2),
I'm afraid. That simply has to do with the fact that we now actually care
about them, previously they were mostly discarded.

I'd be glad if you submitted a relatively isolated reproducer of what is
fast with 8.8 and slow with 8.10 (even better 9.0).
I hope that things have improved since we fixed
https://gitlab.haskell.org/ghc/ghc/-/issues/17836, which is part of 9.0 but
not of 8.10.


Am Mo., 15. Feb. 2021 um 19:04 Uhr schrieb Troels Henriksen <
athas at sigkill.dk>:

> Carter Schonwald <carter.schonwald at gmail.com> writes:
> > Ccing ghc devs since that’s a better forum perhaps
> > Crazy theory:
> >
> > this is a regression due the the partial changes to pattern matching
> > coverage checking in 8.10 that finished / landed in ghc 9
> >
> > Why:
> > Desugaring is when pattern/ case statement translation happens I think?
> > And the only obvious “big thing” is that you have some huge , albeit sane
> > for a compiler, pattern matching
> >
> > I’d first check if the new ghc 9 release doesn’t have that regression in
> > build time that you experienced.  And if it does file a ticket.
> >
> > I may be totally wrong, but that seems like a decent likelihood !
> You may be right!  Another module that regressed is also mainly
> characterised by large-but-not-insane case expressions:
> https://github.com/diku-dk/futhark/blob/d0839412bdd11884d75a1494dd5de5191833f39e/src/Futhark/Optimise/Simplify/Rules.hs
> I'll try to split these modules up a little bit (I should have done so a
> while ago anyway) and maybe that will make the picture even clearer.
> --
> \  Troels
> /\ Henriksen
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210215/526f19c6/attachment.html>

More information about the Haskell-Cafe mailing list