#15867: STG scope error -------------------------------------+------------------------------------- Reporter: csabahruska | Owner: sgraf Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.7 Resolution: | Keywords: CodeGen Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5310 Wiki Page: | -------------------------------------+------------------------------------- Comment (by csabahruska): I've improved the scope checking: - allows unique name shadowing (nested scopes) - checks OccName duplications only for exported top-level names - check Unique duplications for StgRhsClosure, StgRec, DataAlt I've attached the improved linter patch. (StgScopeCheck2.patch). It requires the `nub` fix. Using this improvements I've got new errors: {{{ buggy source: libraries/base/Data/Type/Equality.hs *** Stg Lint ErrMsgs: in Unarise *** <no location info>: warning: [in body of lambda with binders void_0E :: Void#, void_0E :: Void#] void_0E :: Void# is duplicated (Uniq) *** Offending Program *** HRefl :: forall k2 k2 (a :: k2) (b :: k2). (k2 ~# k2) -> (b ~# a) -> a :~~: b [GblId[DataCon], Arity=2, Caf=NoCafRefs, Str=<L,U><L,U>m, Unf=OtherCon []] = [] \r [void_0E void_0E] HRefl []; }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15867#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler