A default setting for DynFlags.Settings?

Kwanghoon Choi lazyswamp at gmail.com
Sun Jun 20 16:28:12 UTC 2021


Hi Glasgow-haskell-users,

I am wondering if there is a declaration of a default setting value for
DynFlags.Settings:

Settings
  :: GhcNameVersion
     -> FileSettings
     -> Platform
     -> ToolSettings
     -> PlatformMisc
     -> PlatformConstants
     -> [(String, String)]
     -> Settings

in DynFlags

 -
https://www.stackage.org/haddock/nightly-2019-09-04/ghc-lib-parser-8.8.0.20190424/DynFlags.html
.

I am attempting to use Lexer.lexer, which is provided by the ghc-parser-lib
package.
To make Lexer.lexer run, I seem to have such a setting value.

I managed to fill it by myself as defaultSettings (Line 82) in the
following source code:

 - https://github.com/kwanghoon/hslexer/blob/master/app/Main.hs

with a sequence of meaningless 0, False, "", and [], which are not relevant
to
the usage of Lexer.lexer, I think.

Are there any better ways to make a setting value just for the usage of
Lexer.lexer?


Anyway, it is great to see that it is quite easy to make use of the Haskell
lexer
by using GHC and the ghc-parser-lib package!

Kinds regards

Kwanghoon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20210620/6995f6f2/attachment.html>


More information about the Glasgow-haskell-users mailing list