← all modules

Std.Config

Std.Config
  Std.Config — typed TOML/YAML/JSON decoders (Layer 3 Sky source).

Types
  type Decoder = Decoder

Values
  andThen : (a -> Decoder b) -> Decoder a -> Decoder b
  at : List String -> Decoder a -> Decoder a
      `at path decoder` — drill into nested fields.  `at ["db",
  bool : Decoder Bool
  decodeJson : String -> Decoder a -> Result Error a
      Run a decoder against a JSON document.  Alias for
  decodeToml : String -> Decoder a -> Result Error a
      Run a decoder against a TOML document.
  decodeYaml : String -> Decoder a -> Result Error a
      Run a decoder against a YAML document.
  fail : String -> Decoder a
  field : String -> Decoder a -> Decoder a
      `field name decoder` — decode the named field at the current
  float : Decoder Float
  int : Decoder Int
  list : Decoder a -> Decoder (List a)
  loadFromFile : String -> Decoder a -> Task Error a
      `loadFromFile path decoder` — read `path`, dispatch to the
  map : (a -> b) -> Decoder a -> Decoder b
  nullable : Decoder a -> Decoder (Maybe a)
      `nullable decoder` — like `decoder`, but `Nothing` on null /
  string : Decoder String
  succeed : a -> Decoder a