[commit: ghc] master: Add a recursivity check in nonVoid (e68b439)

git at git.haskell.org git at git.haskell.org
Sun Sep 23 14:13:37 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e68b439fe5de61b9a2ca51af472185c62ccb8b46/ghc

>---------------------------------------------------------------

commit e68b439fe5de61b9a2ca51af472185c62ccb8b46
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Sun Sep 23 08:15:13 2018 -0400

    Add a recursivity check in nonVoid
    
    Summary:
    Previously `nonVoid` outright refused to call itself
    recursively to avoid the risk of hitting infinite loops when
    checking recurisve types. But this is too conservative—we //can//
    call `nonVoid` recursively as long as we incorporate a way to detect
    the presence of recursive types, and bail out if we do detect one.
    Happily, such a mechanism already exists in the form of `checkRecTc`,
    so let's use it.
    
    Test Plan: make test TEST=T15584
    
    Reviewers: simonpj, bgamari
    
    Reviewed By: simonpj
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15584
    
    Differential Revision: https://phabricator.haskell.org/D5116


>---------------------------------------------------------------

e68b439fe5de61b9a2ca51af472185c62ccb8b46
 compiler/deSugar/Check.hs                        | 191 +++++++++++++++++------
 compiler/types/TyCon.hs                          |  19 ++-
 testsuite/tests/pmcheck/should_compile/T15584.hs |  15 ++
 testsuite/tests/pmcheck/should_compile/all.T     |   2 +
 4 files changed, 174 insertions(+), 53 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc e68b439fe5de61b9a2ca51af472185c62ccb8b46


More information about the ghc-commits mailing list