We give a temporal reading of graded coeffects: tropical grades carry guards on infinite computation. To illustrate it, we first define $G_T$, a polymorphic calculus with guarded recursive types that guarantees productive infinite computation, in the form of hereditary head normalisation. The calculus supports stream computing via the Scott encoding, and embeds Nakano's later modality. We then introduce $I_T$, a graded intersection type system with guarded infinitary types for the pure λ-calculus, whose typability allows for an exact characterisation of hereditary head normalisation. We prove that the characterising typability predicate is $Π_0^2$, matching the recursion-theoretic complexity of the characterised property.
翻译:暂无翻译