Skip to content
  • skvadrik's avatar
    Improved error message about exported type operators. · 693a54ea
    skvadrik authored and Ben Gamari's avatar Ben Gamari committed
    There is ambiguty between (1) type constructors and (2) data
    constructors in export lists, e.g. '%%' can stand for both of them. This
    ambiguity is resolved in favor of (2).
    
    If the exported data constructor is not in scope, but type constructor
    with the same name is in scope, GHC should suggest adding 'type' keyword
    to resolve ambiguity in favor of (1) and enabling 'TypeOperators'
    extension.
    
    The patch only extends the error message.
    
    See Trac #11432.
    
    Test Plan: `make test`
    
    Reviewers: simonpj, bgamari, austin
    
    Reviewed By: simonpj
    
    Subscribers: mpickering, thomie, goldfire, kosmikus
    
    Differential Revision: https://phabricator.haskell.org/D1902
    
    GHC Trac Issues: #11432
    693a54ea