sheen

Types

pub type Parser(a) {
  Parser(spec: ParserSpec, validator: Validator(a))
}

Constructors

  • Parser(spec: ParserSpec, validator: Validator(a))
pub type ParserSpec {
  ParserSpec(
    cmd: command.CommandSpec,
    name: option.Option(String),
    authors: List(String),
    version: option.Option(String),
  )
}

Constructors

  • ParserSpec(
      cmd: command.CommandSpec,
      name: option.Option(String),
      authors: List(String),
      version: option.Option(String),
    )

Functions

pub fn authors(
  to parser: ParserSpec,
  set authors: List(String),
) -> ParserSpec
pub fn build(
  from parser: ParserSpec,
  with builder: fn(CommandSpec) -> Result(Builder(a), String),
) -> Result(Parser(a), String)
pub fn extract(
  from validator: fn(ValidatorInput) -> Result(a, String),
  to cont: fn(a) -> fn(ValidatorInput) -> Result(b, String),
) -> fn(ValidatorInput) -> Result(b, String)
pub fn name(
  to parser: ParserSpec,
  set name: String,
) -> ParserSpec
pub fn new() -> ParserSpec
pub fn version(
  to parser: ParserSpec,
  set version: String,
) -> ParserSpec
Search Document