[commit: ghc] master: 'DynFlag'-free version of 'mkParserFlags' (5aa2923)

git at git.haskell.org git at git.haskell.org
Thu Nov 22 21:07:42 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5aa29231ab7603537284eff5e4caff3a73dba6d2/ghc

>---------------------------------------------------------------

commit 5aa29231ab7603537284eff5e4caff3a73dba6d2
Author: Alec Theriault <alec.theriault at gmail.com>
Date:   Thu Nov 22 14:39:41 2018 -0500

    'DynFlag'-free version of 'mkParserFlags'
    
    Obtaining a `DynFlags` is difficult, making using the lexer/parser
    for pure parsing/lexing unreasonably difficult, even with
    `mkPStatePure`.
    This is despite the fact that we only really need
    
      * language extension flags
      * warning flags
      * a handful of boolean options
    
    The new `mkParserFlags'` function makes is easier to directly construct
    a `ParserFlags`. Furthermore, since `pExtsBitmap` is just a footgun,
    I've gone ahead and made `ParserFlags` an abstract type.
    
    Reviewers: bgamari, alanz, sjakobi
    
    Reviewed By: bgamari, sjakobi
    
    Subscribers: mpickering, sjakobi, rwbarton, carter
    
    GHC Trac Issues: #11301
    
    Differential Revision: https://phabricator.haskell.org/D5269


>---------------------------------------------------------------

5aa29231ab7603537284eff5e4caff3a73dba6d2
 compiler/parser/Lexer.x     | 106 ++++++++++++++++++++++++++++----------------
 compiler/parser/Parser.y    |  10 ++---
 compiler/parser/RdrHsSyn.hs |  22 +++++----
 3 files changed, 83 insertions(+), 55 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 5aa29231ab7603537284eff5e4caff3a73dba6d2


More information about the ghc-commits mailing list