[GHC] #11164: No way to import a data instance
GHC
ghc-devs at haskell.org
Fri Dec 4 14:50:40 UTC 2015
#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
More information about the ghc-tickets
mailing list