mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-13 21:40:43 +00:00
0bd21762ae
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.
15 lines
359 B
Agda
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
|