fix: rename type variables during concretization to prevent collisions (#1212)
fix: rename type variables during concretization to prevent collisions (#1212)

Our use of type variables in deftype forms to support parametric
polymorphism relied on precise matching between variables in the head
and the body of the form. However, this could lead to unification
failure when the concretizer encountered a type that mixed two
polymorphic types that use the same type var name:

```
(deftype (HitRecord a) [ t a ])
(deftype (CurrentHit a) [ hr (Maybe (HitRecord a)) ])
```

Concretizing this would previously attempt to bind both Maybe(HitRecord
) and just (HitRecord) to `a`.

To fix this, we temporarily rename all type variables in type
definitions during concretization. Names are preserved in place, so
there's no danger of losing a variable. The code above will now work:

```
=> (CurrentHit.init (Just (HitRecord.init 5)))
(CurrentHit (Just (HitRecord 5)))
=> (HitRecord.init 3)
(HitRecord 3)
```

Fixes #521
eriksvedang/Carp,carp-lang/Carp,carp-lang/Carp,eriksvedang/Carp,carp-lang/Carp