← Back to Examples

09 Derive

Cure language example demonstrating various features

Source Code

module derive_example do
export [main/0]

# Simple Record with Automatic Derivation
record Point do
    x: Int
    y: Int
end
derive Show, Eq, Ord

# Generic container with type parameter
record Container(T) do
    value: T
end
derive Show, Eq

def main(): Int =
    0

end