diff options
| author | Alasdair Armstrong | 2018-03-05 17:21:13 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-03-05 17:21:13 +0000 |
| commit | 68df36a0e620ddd4d8c5d17384795d24b106f9d8 (patch) | |
| tree | 378204664fd36e25851603e1b1b7a96e9edb3f57 /language/bytecode.ott | |
| parent | 22883e5222a1a35cdca7177cdbefec8dec6d715d (diff) | |
Fix specialisation pass to handle polymorphic substitutions
Can now handle when an instantiation introduces more polymorphism. We
can now deal with the case where, for example, a type variable gets
specialised in two two steps, e.g. 'a => list('a) => list(int). Also
handle the case where a Type-kinded type variable gets substituted
with an Int-polymorphic type, e.g. 'a => atom('n).
This also fixes an issue where specialisation would loop due to
generated type variable names. This was fixed by ensuring that when we
convert an instantiation to a string to name the newly specialised
definition, we ensure that any alpha-equivalent instantiations map to
the same name.
Diffstat (limited to 'language/bytecode.ott')
0 files changed, 0 insertions, 0 deletions
