1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-12 14:28:08 +03:00
juvix/tests/Internal
Paul Cadman feff86d576
Translate as-pattern binders to Core PatternBinders (#1789)
Before this change, nested as-patterns (i.e as-patterns binding
arguments to constructors) were not translated to Core pattern binders.

This meant that the following function would crash the compiler:

```
f : List Nat -> List Nat;
f  (x :: a@(x' :: xs)) := a;
f _ := nil;
```

i.e the nested as-pattern `a` was ignored in the internal to core
translation.

This commit translates each as-pattern to a Core `PatternBinder`.

* Fixes https://github.com/anoma/juvix/issues/1788
* Fixes https://github.com/anoma/juvix/issues/1738
2023-01-31 14:32:50 +00:00
..
Core/positive Adapt Juvix programs to the new pipeline (#1746) 2023-01-23 14:57:01 +01:00
positive Translate as-pattern binders to Core PatternBinders (#1789) 2023-01-31 14:32:50 +00:00