Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
cache :: TVar (Map [String] (RemoteData IOException Settings)) Source #
Getting settings is not instantaneous. Since settings are usually reused
between modules, it makes sense to cache them. However each module can
potentially customize its settings using the OPTIONS_GHC
pragma. This
variable is used as a cache of settings keyed on the command line options.
semaphore :: TMVar () Source #
Even though we cache settings based on command line options, we only want
to load settings one at a time. Practically this is to work around a bug in
GHC. But aside from that, loading settings calls withArgs
and doing that
simultaneously in separate threads is dubious.
https://gitlab.haskell.org/ghc/ghc/issues/18261