[GHC] #11163: New exhaustiveness checker breaks T5642
GHC
ghc-devs at haskell.org
Mon Feb 8 16:56:50 UTC 2016
#11163: New exhaustiveness checker breaks T5642
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: gkaracha
Type: bug | Status: new
Priority: high | Milestone: 8.0.1
Component: Compiler | Version: 7.10.2
Resolution: | Keywords: pattern
| checker, PatternMatchWarnings
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by gkaracha):
After merging Phab:D1795, I checked again the situation with T5642:
With the old pattern match checker the deviation (for bytes allocated) for
#5642 was 196.8%. With
the current HEAD it is 222.3%, yet this increase is not only due to the
new checker. Disabling
coverage checking for the test gives deviation 212.0%, which means that
only 10.3% is due to the
new checker.
Concerning this 10.3%, the module uses the generics library and function
`to :: Rep a x -> a` has
100 clauses, all with nested patterns. Most importantly, `Rep` is a type
family, which means that
the new checker goes the extra mile to ensure they are all well-typed.
Hence, this 10.3% is quite
reasonable (the old pattern match checker was --in most cases-- faster
because it did not take into
account types).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11163#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list