
#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): phab:D1573 Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * owner: kanetw => * status: closed => new * resolution: fixed => Comment: Wait a sec. [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/type- families.html#data-family-import-export Section 7.7.4 of the user manual] describes how the rules for exports are modified for families; so it definitely needs a new bullet! And the adjustment in `exports_from_avail` is delicate. It actually only fires on data families, because only with data families can we have a ''locally-defined'' subordinate thing (data constructor, class op) whose parent type constructor is ''imported''. Worth spelling this out. All this only applies for modules with no export list. The comment says "Generally, whenever we export a part of a declaration, export the declaration, too." That seems a bit misleading, doesn't it? It really only applies to data families. So I'm ok with the code but I do think the documentation needs a little work (comments, user manual). Many thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11164#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler