constructor function

Constructor constructor(
  1. String name,
  2. Map<String, Sort> fields
)

Creates a constructor used in a datatype declaration.

Implementation

Constructor constructor(
  String name,
  Map<String, Sort> fields,
) =>
    Constructor(
      Sym(name),
      Sym('is_$name'),
      fields.map((key, value) => MapEntry(Sym(key), value)),
    );