Open gelisam opened 1 year ago
In this ticket, I am specifically not asking about supporting (true)
instead of true
, because I know that the parentheses-free syntax is not supported in patterns. I think the parentheses-free syntax should be fine in type-case
patterns because we already have many primitive types which don't need parentheses.
I would like to be able to write
instead of
Currently,
stdlib/builtins.kl
defines the appropriate wrappers so that we can write(the Bool (true))
instead of(the (Bool) (true)
. It would be nice if that syntax was supported out of the box for user-defined datatypes as well. This sounds easy to implement, by defining a Preludedata
macro wrapping the kernel'sdata
macro.