Re: [stack] possibilities for macros in a typed language
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
>> I thought this was only done in Cat when an occurs check fails. What >> exactly are the rules for when to generate new variables? > > When you unify a polymorphic function type (e.g. one that has generic > type-variables) on the left side of the arrow with a type variable, > every instantiation of the polymorphic function variable should have > new copies generated of its generic type-variables. Makes sense. I figured this would probably have to be the case if quote were handled properly (which it is). Thank you for explaining. >> It also unfortunately (and perhaps obviously) means your type system is >> not compositional. > > Yes. Personally I find this disappointing, but acceptable. Agreed. > One way to recover compositionality of the type system may > be to reintroduce equirecursive types. Oi. I'll have to take a good look at this. - John