
#11698: GHC's tct_closed flag is not being set correctly -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: 11656 Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by facundo.dominguez): The definition reads {{{ Definition: A variable is "closed", and has tct_closed set to TopLevel, iff a) all its free variables are imported, or are let-bound with closed types b) generalisation is not restricted by the monomorphism restriction }}} I suppose that (a) should read instead: {{{ a) all its free variables are imported, or are let-bound and closed. }}} i.e. not only the type must be closed, the defining term should be as well. If closed types are required for a binding to be closed, then a new item (c) should be added asking for it, unless (a) implies that somehow: {{{ Definition: A variable is "closed", and has tct_closed set to TopLevel, iff a) all its free variables are imported, or are let-bound and closed b) generalisation is not restricted by the monomorphism restriction c) it has a closed type }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11698#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler