• kanetw's avatar
    Re-export data family when exporting a data instance without an export list · 8cef8af3
    kanetw authored
    Whenever a data instance is exported, the corresponding data family
    is exported, too. This allows one to write
    
    ```
         -- Foo.hs
         module Foo where
    
         data family T a
    
         -- Bar.hs
         module Bar where
    
         import Foo
    
         data instance T Int = MkT
    
         -- Baz.hs
         module Baz where
    
         import Bar (T(MkT))
    ```
    
    In previous versions of GHC, this required a workaround
    explicit export list in `Bar`.
    
    Reviewers: bgamari, goldfire, austin
    
    Reviewed By: bgamari, goldfire
    
    Subscribers: goldfire, thomie
    
    Differential Revision: https://phabricator.haskell.org/D1573
    
    GHC Trac Issues: #11164
    8cef8af3
7.12.1-notes.rst 13.7 KB