PreviousUpNext

10.10.5  Record Types

Record types are also written much like record expressions and patterns, as comma-separated list of types record elements. The record elements here are field names together with their types. The field names are part of the type of a record; the order of the fields is not.

    My_Field_Type = { name: String, age: Int };

Record types, like all types, may be nested arbitrarily:

    My_Complex_Record_Type = { name: String, state: (((Int, Float, String), (String, { id: String, weight: Float }, Int)), Int) };

Comments and suggestions to: bugs@mythryl.org

PreviousUpNext