luau/prototyping/Luau/RuntimeType.agda
Lily Brown 0bd21762ae
Prototype bools and relational operators (#387)
Prototypes booleans and relational operators.

As part of this I removed `FFI/Data/Bool.agda`, because it was getting in the way - we already use `Agda.Builtin.Bool` instead for other cases.
2022-02-24 11:17:46 -08:00

15 lines
359 B
Agda

module Luau.RuntimeType where
open import Luau.Value using (Value; nil; addr; number; bool)
data RuntimeType : Set where
function : RuntimeType
number : RuntimeType
nil : RuntimeType
boolean : RuntimeType
valueType : Value RuntimeType
valueType nil = nil
valueType (addr x) = function
valueType (number x) = number
valueType (bool _) = boolean