Parse effectful arrow in function annotations

This commit is contained in:
Agus Zubiaga 2024-09-17 20:41:14 -03:00
parent 1a5776653c
commit ef4eeb5c1a
No known key found for this signature in database
30 changed files with 178 additions and 19 deletions

View file

@ -881,8 +881,9 @@ impl<'a> Normalize<'a> for Pattern<'a> {
impl<'a> Normalize<'a> for TypeAnnotation<'a> {
fn normalize(&self, arena: &'a Bump) -> Self {
match *self {
TypeAnnotation::Function(a, b) => TypeAnnotation::Function(
TypeAnnotation::Function(a, arrow, b) => TypeAnnotation::Function(
arena.alloc(a.normalize(arena)),
arrow,
arena.alloc(b.normalize(arena)),
),
TypeAnnotation::Apply(a, b, c) => TypeAnnotation::Apply(a, b, c.normalize(arena)),