• Tao He's avatar
    Raise parse error for `data T where`. · 8936ab69
    Tao He authored
    Empty GADTs data declarations can't be identified in type checker. This
    patch adds additional checks in parser and raise a parse error when
    encounter empty GADTs declarations but extension `GADTs` is not enabled.
    
    Only empty declarations are checked in parser to avoid affecting
    existing
    error messages related to missing GADTs extension.
    
    This patch should fix issue 8258.
    Signed-off-by: Tao He's avatarHE, Tao <sighingnow@gmail.com>
    
    Test Plan: make test TEST="T8258 T8258NoGADTs"
    
    Reviewers: bgamari, mpickering, alanz, RyanGlScott
    
    Reviewed By: bgamari, RyanGlScott
    
    Subscribers: adamse, RyanGlScott, rwbarton, thomie, mpickering, carter
    
    GHC Trac Issues: #8258
    
    Differential Revision: https://phabricator.haskell.org/D4350
    8936ab69
all.T 5.24 KB