Skip to content
  • Matthew Pickering's avatar
    Forbid variables to be parents in import lists. · 53f26f5a
    Matthew Pickering authored and Ben Gamari's avatar Ben Gamari committed
    In the long discussion on #11432, it was decided that when a type
    constructor is parsed as a variable ((--.->) is one example) then in
    order to export the type constructor then the user should be required to
    use the ExplicitNamespaces keyword.
    
    This was implemented in quite an indirect manner in the renamer. It
    is much more direct to enforce this in the parser at the expense of
    slighty worse error messages. Further to this, the check in the
    renamer was actually slightly wrong. If the variable was in scope
    then no error was raised, this was causing panics, see #12026 for an
    example.
    
    Reviewers: austin, bgamari
    
    Subscribers: davean, skvadrik, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2181
    
    GHC Trac Issues: #12026
    53f26f5a