gleamgen/expression/constructor

Types

Use to_expression[n] or to_expression_unchecked to create an expression from the constructor.

pub opaque type Constructor(construct_to, args, generics)
pub type Variants1(a) =
  #(#(), a)
pub type Variants2(a, b) =
  #(#(#(), a), b)
pub type Variants3(a, b, c) =
  #(#(#(#(), a), b), c)
pub type Variants4(a, b, c, d) =
  #(#(#(#(#(), a), b), c), d)
pub type Variants5(a, b, c, d, e) =
  #(#(#(#(#(#(), a), b), c), d), e)
pub type Variants6(a, b, c, d, e, f) =
  #(#(#(#(#(#(#(), a), b), c), d), e), f)
pub type Variants7(a, b, c, d, e, f, g) =
  #(#(#(#(#(#(#(#(), a), b), c), d), e), f), g)
pub type Variants8(a, b, c, d, e, f, g, h) =
  #(#(#(#(#(#(#(#(#(), a), b), c), d), e), f), g), h)
pub type Variants9(a, b, c, d, e, f, g, h, i) =
  #(#(#(#(#(#(#(#(#(#(), a), b), c), d), e), f), g), h), i)

Functions

pub fn name(constructor: Constructor(a, b, c)) -> String
pub fn to_expression0(
  constructor: Constructor(a, #(), b),
) -> Expression(a)
pub fn to_expression1(
  constructor: Constructor(a, #(#(), b), c),
) -> Expression(fn(b) -> CustomType(a, c))
pub fn to_expression2(
  constructor: Constructor(a, #(#(#(), b), c), d),
) -> Expression(fn(b, c) -> CustomType(a, d))
pub fn to_expression3(
  constructor: Constructor(a, #(#(#(#(), b), c), d), e),
) -> Expression(fn(b, c, d) -> CustomType(a, e))
pub fn to_expression4(
  constructor: Constructor(a, #(#(#(#(#(), b), c), d), e), f),
) -> Expression(fn(b, c, d, e) -> a)
pub fn to_expression5(
  constructor: Constructor(
    a,
    #(#(#(#(#(#(), b), c), d), e), f),
    g,
  ),
) -> Expression(fn(b, c, d, e, f) -> a)
pub fn to_expression6(
  constructor: Constructor(
    a,
    #(#(#(#(#(#(#(), b), c), d), e), f), g),
    h,
  ),
) -> Expression(fn(b, c, d, e, f, g) -> a)
pub fn to_expression7(
  constructor: Constructor(
    a,
    #(#(#(#(#(#(#(#(), b), c), d), e), f), g), h),
    i,
  ),
) -> Expression(fn(b, c, d, e, f, g, h) -> a)
pub fn to_expression8(
  constructor: Constructor(
    a,
    #(#(#(#(#(#(#(#(#(), b), c), d), e), f), g), h), i),
    j,
  ),
) -> Expression(fn(b, c, d, e, f, g, h, i) -> a)
pub fn to_expression9(
  constructor: Constructor(
    a,
    #(#(#(#(#(#(#(#(#(#(), b), c), d), e), f), g), h), i), j),
    k,
  ),
) -> Expression(fn(b, c, d, e, f, g, h, i, j) -> a)
pub fn to_expression_unchecked(
  constructor: Constructor(a, b, c),
) -> Expression(d)
pub fn unsafe_convert(
  constructor: Constructor(a, b, c),
) -> Constructor(a, d, e)
Search Document