
#11164: No way to import a data instance -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Agreed on all fronts. Would it be better to have this rule? * Whenever a module omits an export list, if that module declares and data instances, the data family is also (re-)exported. That would seem to fix your problem. Note that there is no difficulty if the exporting module specifies an export list, as it has to either export the data family itself, or use `pattern` to export the data instance constructor. In the latter case, we assume the module author has a reason not to export the data family (and, the exact same scenario happens with ordinary datatypes, requiring importers with import lists to also use `pattern`). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11164#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler