A default setting for DynFlags.Settings?

Kwanghoon Choi <[email protected]> Sun, 20 Jun 2021 17:28:12 +0100
Newsgroups gmane.comp.lang.haskell.glasgow.user
Message-ID <CAN+A2EVvN9FTfmBAVmF=2b6dXb9=G1p7qWAntcHa5EQ_xjhA7g@mail.gmail.com>
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

_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users