• Rik Steenkamp's avatar
    Reject import declaration with semicolon in GHCi · a84c21eb
    Rik Steenkamp authored
    Now GHCi rejects input containing an import declaration and semicolon,
    and prints an appropriate error message. Before, the stuff after an
    import declaration and semicolon got ignored (most of the time), without
    telling the user about it. As the default behaviour of GHCi is to reject
    multiple commands in a single input, we extend this behaviour to import
    commands.
    
    This patch fixes #10663.
    
    (See https://phabricator.haskell.org/D1518 for the introduction of
    `is_import` and `is_decl`.)
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1726
    
    GHC Trac Issues: #10663
    a84c21eb
UI.hs 137 KB