luau/prototyping/Luau/RuntimeType.agda
2022-02-24 13:48:26 -08:00

17 lines
420 B
Agda

module Luau.RuntimeType where
open import Luau.Value 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 x) = function
valueType (number x) = number
valueType (bool _) = boolean
valueType (string _) = string