-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor pattern matches for ghc 8.6.
GHC's pattern match checker seems two regressions in ghc 8.6: 1. In some cases it will hang for several minutes (forever), which was previously fixed by limiting its iterations. Here we fix this by desugaring complex matches. Example: case (a, b) of (Some SObject{} a', Some SObject{} b') -> ... (_ , _ ) -> throwError' ... becomes case a of Some SObject{} a' -> case b of Some SObject{} b' -> ... _ -> throwError' ... _ -> throwError' ... 2. In some cases it erroneously decides a match is redundant (for example in the before example above). This has the same fix. Tested by `stack test` and `cabal test`.
- Loading branch information
1 parent
e366438
commit 57b6250
Showing
3 changed files
with
70 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters