Point a = @data {
x : a,
y : a
}
List a = @data Cons a (List a)
| Nil
-- Optional kind annotations.
Functor : * -> *
Functor f = @class
{ map : (a -> b) -> f a -> f b
, _<*_ : a -> f b -> f a
}
-- The List example from before can be rewritten as:
List a = @data
{ Cons a $ List a
| Nil
}
-- At comptime, everything is values.
-- Here, $ treats types as values,
-- so the compiler infers it must be comptime.