mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
WIP
This commit is contained in:
parent
f6d3981936
commit
658fce4631
3 changed files with 12 additions and 1 deletions
|
@ -6,6 +6,7 @@ import Properties.Contradiction
|
||||||
import Properties.Dec
|
import Properties.Dec
|
||||||
import Properties.Equality
|
import Properties.Equality
|
||||||
import Properties.Functions
|
import Properties.Functions
|
||||||
|
import Properties.FunctionTypes
|
||||||
import Properties.Remember
|
import Properties.Remember
|
||||||
import Properties.Step
|
import Properties.Step
|
||||||
import Properties.StrictMode
|
import Properties.StrictMode
|
||||||
|
|
|
@ -230,6 +230,15 @@ language-comp (function-err t) (function-err p) (function-err q) = language-comp
|
||||||
<:-function-∪-∩ (function-err s) (function-err (right p)) = right (function-err p)
|
<:-function-∪-∩ (function-err s) (function-err (right p)) = right (function-err p)
|
||||||
|
|
||||||
-- Properties of scalars
|
-- Properties of scalars
|
||||||
|
skalar-function-ok : ∀ {t} → (¬Language skalar (function-ok t))
|
||||||
|
skalar-function-ok = (scalar-function-ok number , (scalar-function-ok string , (scalar-function-ok nil , scalar-function-ok boolean)))
|
||||||
|
|
||||||
|
scalar-∩-function-<:-never : ∀ {S T U} → (Scalar S) → ((T ⇒ U) ∩ S) <: never
|
||||||
|
scalar-∩-function-<:-never number .(scalar number) (() , scalar number)
|
||||||
|
scalar-∩-function-<:-never boolean .(scalar boolean) (() , scalar boolean)
|
||||||
|
scalar-∩-function-<:-never string .(scalar string) (() , scalar string)
|
||||||
|
scalar-∩-function-<:-never nil .(scalar nil) (() , scalar nil)
|
||||||
|
|
||||||
function-≮:-scalar : ∀ {S T U} → (Scalar U) → ((S ⇒ T) ≮: U)
|
function-≮:-scalar : ∀ {S T U} → (Scalar U) → ((S ⇒ T) ≮: U)
|
||||||
function-≮:-scalar s = witness function function (scalar-function s)
|
function-≮:-scalar s = witness function function (scalar-function s)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
module Properties.TypeNormalization where
|
module Properties.TypeNormalization where
|
||||||
|
|
||||||
open import Luau.Type using (Type; Scalar; nil; number; string; boolean; never; unknown; _⇒_; _∪_; _∩_; src)
|
open import Luau.Type using (Type; Scalar; nil; number; string; boolean; never; unknown; _⇒_; _∪_; _∩_)
|
||||||
|
open import Luau.Subtyping using (scalar-function-err)
|
||||||
open import Luau.TypeNormalization using (_∪ⁿ_; _∩ⁿ_; _∪ᶠ_; _∪ⁿˢ_; _∩ⁿˢ_; normalize)
|
open import Luau.TypeNormalization using (_∪ⁿ_; _∩ⁿ_; _∪ᶠ_; _∪ⁿˢ_; _∩ⁿˢ_; normalize)
|
||||||
open import Luau.Subtyping using (_<:_)
|
open import Luau.Subtyping using (_<:_)
|
||||||
open import Properties.Subtyping using (<:-trans; <:-refl; <:-unknown; <:-never; <:-∪-left; <:-∪-right; <:-∪-lub; <:-∩-left; <:-∩-right; <:-∩-glb; <:-∩-symm; <:-function; <:-function-∪-∩; <:-function-∩-∪; <:-function-∪; <:-everything; <:-union; <:-∪-assocl; <:-∪-assocr; <:-∪-symm; <:-intersect; ∪-distl-∩-<:; ∪-distr-∩-<:; <:-∪-distr-∩; <:-∪-distl-∩; ∩-distl-∪-<:; <:-∩-distl-∪; <:-∩-distr-∪; scalar-∩-function-<:-never; scalar-≢-∩-<:-never)
|
open import Properties.Subtyping using (<:-trans; <:-refl; <:-unknown; <:-never; <:-∪-left; <:-∪-right; <:-∪-lub; <:-∩-left; <:-∩-right; <:-∩-glb; <:-∩-symm; <:-function; <:-function-∪-∩; <:-function-∩-∪; <:-function-∪; <:-everything; <:-union; <:-∪-assocl; <:-∪-assocr; <:-∪-symm; <:-intersect; ∪-distl-∩-<:; ∪-distr-∩-<:; <:-∪-distr-∩; <:-∪-distl-∩; ∩-distl-∪-<:; <:-∩-distl-∪; <:-∩-distr-∪; scalar-∩-function-<:-never; scalar-≢-∩-<:-never)
|
||||||
|
|
Loading…
Add table
Reference in a new issue