Skip to content
  • skvadrik's avatar
    Removed deprecated syntax for GADT constuctors. · 30c981e1
    skvadrik authored and Ben Gamari's avatar Ben Gamari committed
    Old syntax was deprecated 6 years ago in this commit
    432b9c93 by simonpj:"New syntax for
    GADT-style record declarations, and associated refactoring" discussed
    in Trac #3306.
    
    This patch removes 2 reduce/reduce conflicts in parser. Conflicting
    productions were:
    
    ```
        gadt_constr -> con_list '::' sigtype
        gadt_constr -> oqtycon '{' fielddecls '}' '::' sigtype
    ```
    
    Recursive inlining of `con_list` and `oqtycon` helped reveal the
    conflict:
    
    ```
        gadt_constr -> '(' CONSYM ')' '::' sigtype
        gadt_constr -> '(' CONSYM ')' '{' fielddecls '}' '::' sigtype
    ```
    
    between two types of GADT constructors (second form stands for
    deprecated syntax).
    
    Test Plan: `make fasttest`, one breakage TEST="records-fail" (parse
    error instead of typecheck error due to removal of deprecated syntax).
    Updated test.
    
    Reviewers: simonmar, bgamari, austin, simonpj
    
    Reviewed By: simonpj
    
    Subscribers: thomie, mpickering, trofi
    
    Differential Revision: https://phabricator.haskell.org/D1118
    
    GHC Trac Issues: #3306
    30c981e1