Page MenuHomePhabricator

Allow Z1K1s to Be Literal Types
Open, Needs TriagePublic

Description

For built-in types, we currently enforce that the type be a Z9. This is not technically correct and may inhibit some of Ali's proposed changes to the implementation of lambda calculus.

Event Timeline

The Z1K1 of an object may indeed be a literal type.

But a literal type should always be replaceable by its identity.

The identity of a literal type should always be either a reference to a type, or (in the case of a generic type) a function call which would result in the literal type.

So in order to be valid, the following conditions must be true (and we can make the following assumptions):

  • the value of Z1K1 is always either a
    • Z9 pointing to a Z4
    • Z7 with a function with return type Z4
    • a Z4 literal. The Z4 literal LT will have a Z4K1 which is either
      • a Z9 pointing to a Z4 that is identical to the embedding literal LT
      • a Z7, which, if evaluated, would result in the embedding literal LT

This means we can always replace a Z1K1 that is a Z4 literal with its Z4K1, and that would result in exactly the same meaning.

So for validation, we can either assume that we always have a literal, or never, by either replacing Z9 or Z7 with the resolved result, or by replacing a Z4 with its Z4K1.

In that case that would resolve this task.

Are these assumptions all correct?

(Handing to Cory to check against my assumptions)