[GHC] #10341: hs-boot files can have bogus declarations if they're not exported

#10341: hs-boot files can have bogus declarations if they're not exported -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.11 (Type checker) | Operating System: Unknown/Multiple Keywords: | Type of failure: GHC accepts Architecture: | invalid program Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Consider: {{{ -- A.hs-boot module A(foo) where data A = AC { bar :: Int } | CC -- B.hs module B where import {-# SOURCE #-} A -- A.hs module A(foo) where import B data A = AC { foo :: Int } | BC }}} GHC won't complain that `A` is incompatibly defined, since it's not exported. Seems relatively harmless though. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10341 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10341: hs-boot files can have bogus declarations if they're not exported -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Keywords: Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: GHC accepts | Test Case: invalid program | Blocking: Blocked By: | Differential Revisions: Related Tickets: | -------------------------------------+------------------------------------- Description changed by simonpj: Old description:
Consider:
{{{ -- A.hs-boot module A(foo) where data A = AC { bar :: Int } | CC -- B.hs module B where import {-# SOURCE #-} A -- A.hs module A(foo) where import B data A = AC { foo :: Int } | BC }}}
GHC won't complain that `A` is incompatibly defined, since it's not exported.
Seems relatively harmless though.
New description: Consider: {{{ -- A.hs-boot module A(foo) where foo :: A -> Int data A = AC { bar :: Int } | CC -- NB: A is not exported -- B.hs module B where import {-# SOURCE #-} A -- A.hs module A(foo) where import B data A = AC { foo :: Int } | BC }}} GHC won't complain that `A` is incompatibly defined, since it's not exported. Seems relatively harmless though. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10341#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC