[GHC] #15584: nonVoid is too conservative w.r.t. strict argument types
GHC
ghc-devs at haskell.org
Sun Sep 23 14:13:30 UTC 2018
#15584: nonVoid is too conservative w.r.t. strict argument types
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.5
Resolution: | Keywords:
| PatternMatchWarnings
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: #15305 | Differential Rev(s): Phab:D5116
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott <ryan.gl.scott@…>):
In [changeset:"e68b439fe5de61b9a2ca51af472185c62ccb8b46/ghc" e68b439/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="e68b439fe5de61b9a2ca51af472185c62ccb8b46"
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
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15584#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list