Typer: keep type abstraction after checking

E. Rivas requested to merge er433/fix/typer+e_type_abs into dev

type:internal

For LIGO developers

After the introduction of E_type_abstraction, we can now keep those abstractions until monomorphisation.

Before this MR, we were removing E_type_abstraction, and only guiding monomorphisation using the types:

$ docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.47.0 print ast-typed k.mligo
const k = lambda (x : a) return lambda (_#10 : b) return x

With this MR, now E_type_abstraction is kept after checking:

$ ligo print ast-typed k.mligo
const k = Λ a ->  Λ b ->  lambda (x : a) return lambda (_#10 : b) return x

Monomorphisation needs to work by looking into type abstractions instead of the types (T_for_all).

This MR also profits from deduplication pass to simplify monomorphisation (no need to keep track of "current" bound variable).

Changelog details:

Edited by E. Rivas

Merge request reports