Support type applications
@@ -524,6 +524,11 @@ module.exports = grammar({
$.quasi_quotation
),
+ type_application: $ => seq(
+ '@',
+ $._a_pattern
+ ),
+
lambda: $ => seq(
$.lambda_head,
'->',
@@ -729,9 +734,9 @@ module.exports = grammar({
choice($.function_application, $._a_expression)
)),
- _a_expression: $ => choice(
- $._general_constructor,
- $._qualified_variable,
+ _a_expression: $ => seq(
+ choice(
+ prec.dynamic(-1, $._general_constructor),
$._variable,
$._literal,
$.parenthesized_expression,
@@ -745,6 +750,8 @@ module.exports = grammar({
$.labeled_update,
prec.dynamic(1, $.quasi_quotation)
),
+ optional($.type_application)
+ ),
labeled_update: $ => seq(
choice(
