mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-13 21:40:43 +00:00
17 lines
421 B
Agda
17 lines
421 B
Agda
module Luau.RuntimeType where
|
|
|
|
open import Luau.Syntax using (Value; nil; addr; number; bool; string)
|
|
|
|
data RuntimeType : Set where
|
|
function : RuntimeType
|
|
number : RuntimeType
|
|
nil : RuntimeType
|
|
boolean : RuntimeType
|
|
string : RuntimeType
|
|
|
|
valueType : Value → RuntimeType
|
|
valueType nil = nil
|
|
valueType (addr a) = function
|
|
valueType (number n) = number
|
|
valueType (bool b) = boolean
|
|
valueType (string x) = string
|