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

Troels Henriksen athas at sigkill.dk
Mon Feb 15 18:03:22 UTC 2021


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


More information about the ghc-devs mailing list