Skip to content
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (46 sloc) 2.04 KB
{- The Dhall configuration language does not provide built-in support for
default function arguments. However, you can provide default records that
users can overide using the `//`/`⫽` operator, which is what this module
For more details, see:
This module consolidates all of the defaults into a record so that users can
import all defaults in a single import and access the desired default as a
field of that record. For example:
let defaults = ./defaults.dhall
in defaults.Config
⫽ { disclose =
( defaults.Disclose
⫽ { inventory = Some { default = True, prompt = False } }
Note that only a few types have defaults listed here. This is because
most of the NetHack options are modeled as `Optional` values, where a `None`
means to omit that option from the generated NetHack configuration file and
to use whatever NetHack defaults to. For those options `None` is already a
suitable default value.
We permit omitted options for several reasons:
* We want to preserve the user's intention to use the default value
* The NetHack documentation doesn't specify default values for all options
* The defaults could change between NetHack versions
* Enumerating every option breaks more often between NetHack versions/builds
The following types that we do provide default values for are large records
where we often want to easily specify a few fields rather than specifying
all of the fields or omitting the record entirely.
{ Attributes =
, Config =
, Disclose =
, HiliteStatus =
, ParanoidConfirmation =
, Scores =
You can’t perform that action at this time.