• Adam Sandberg Eriksson's avatar
    Implementation of StrictData language extension · f842ad6c
    Adam Sandberg Eriksson authored
    This implements the `StrictData` language extension, which lets the
    programmer default to strict data fields in datatype declarations on a
    per-module basis.
    
    Specification and motivation can be found at
    https://ghc.haskell.org/trac/ghc/wiki/StrictPragma
    
    This includes a tricky parser change due to conflicts regarding `~` in
    the type level syntax: all ~'s are parsed as strictness annotations (see
    `strict_mark` in Parser.y) and then turned into equality constraints at
    the appropriate places using `RdrHsSyn.splitTilde`.
    
    Updates haddock submodule.
    
    Test Plan: Validate through Harbormaster.
    
    Reviewers: goldfire, austin, hvr, simonpj, tibbe, bgamari
    
    Reviewed By: simonpj, tibbe, bgamari
    
    Subscribers: lelf, simonpj, alanz, goldfire, thomie, bgamari, mpickering
    
    Differential Revision: https://phabricator.haskell.org/D1033
    
    GHC Trac Issues: #8347
    f842ad6c
HsTypes.hs 38.8 KB