Skip to content
  • Alec Theriault's avatar
    'DynFlag'-free version of 'mkParserFlags' · 5aa29231
    Alec Theriault authored and Ben Gamari's avatar Ben Gamari committed
    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
    5aa29231