crux-0.7: Simple top-level library for Crucible Simulation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Crux.Config.Load

Description

This module deals with loading configurations.

Synopsis

Documentation

data Options opts Source #

The result of loading a configuration.

Constructors

ShowHelp

Show help and exit

ShowVersion

Show version and exit

Options opts [FilePath]

We loaded some options

data ColorOptions Source #

Constructors

ColorOptions 

Instances

Instances details
Generic ColorOptions Source # 
Instance details

Defined in Crux.Config.Load

Associated Types

type Rep ColorOptions :: Type -> Type #

type Rep ColorOptions Source # 
Instance details

Defined in Crux.Config.Load

type Rep ColorOptions = D1 ('MetaData "ColorOptions" "Crux.Config.Load" "crux-0.7-DD4jascIe8aJ5p2f7vnjLq" 'False) (C1 ('MetaCons "ColorOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "noColorsErr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "noColorsOut") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

data EarlyConfig opts Source #

Command line options processed before loading the configuration file.

Constructors

EarlyConfig 

Fields

Instances

Instances details
Generic (EarlyConfig opts) Source # 
Instance details

Defined in Crux.Config.Load

Associated Types

type Rep (EarlyConfig opts) :: Type -> Type #

Methods

from :: EarlyConfig opts -> Rep (EarlyConfig opts) x #

to :: Rep (EarlyConfig opts) x -> EarlyConfig opts #

type Rep (EarlyConfig opts) Source # 
Instance details

Defined in Crux.Config.Load

data ConfigFileLoc Source #

Instances

Instances details
Show ConfigFileLoc Source # 
Instance details

Defined in Crux.Config.Load

ErrorAnnotation ConfigFileLoc Source # 
Instance details

Defined in Crux.Config.Load

loadConfig :: Text -> Config opts -> IO (ColorOptions, Options opts) Source #

Merges command-line options, environment variable options, and configuration file options (in that order) to get the overall Options configuration for running Crux. Throws ConfigError on failure.

fromFile :: Text -> Config opts -> Maybe FilePath -> IO opts Source #

Load settings from a file, or from an empty configuration value.

fromEnv :: opts -> EnvDescr opts -> IO opts Source #

Modify the options using an environment variable.