Several fields in the base configuration type are abstract, to allow
user customisation. The UserConfiguration type synonym
instantiates these fields at IO ... so that users can provide an
alternative IO action that yields the desired final value(s).
During launch, purebred executes these actions to produce the final
configuration record.
Thanks to the plugin system and ConfigHook, we can now simplify
the design and implementation:
Remove all abstraction from the Configuration data type (and the
types of relevant fields).
Change the type of defaultConfig to IO UserConfiguration so
that the default "environment dependent" values can be populated.
Move the BChan and log sink fields from Configuration to
AppState.
Remove the InternalConfiguration type synonym. Retain
UserConfiguration (for now) as a synonym of Configuration.
Update the "default editor" action to respect the VISUAL
environment variable, preferring it over EDITOR if defined.
Several fields in the base configuration type are abstract, to allow user customisation. The
UserConfiguration
type synonym instantiates these fields atIO ...
so that users can provide an alternative IO action that yields the desired final value(s). During launch, purebred executes these actions to produce the final configuration record.Thanks to the plugin system and
ConfigHook
, we can now simplify the design and implementation:Remove all abstraction from the
Configuration
data type (and the types of relevant fields).Change the type of
defaultConfig
toIO UserConfiguration
so that the default "environment dependent" values can be populated.Move the BChan and log sink fields from
Configuration
toAppState
.Remove the
InternalConfiguration
type synonym. RetainUserConfiguration
(for now) as a synonym ofConfiguration
.Update the "default editor" action to respect the
VISUAL
environment variable, preferring it overEDITOR
if defined.