mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-14 06:00:39 +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.
14 lines
513 B
Agda
14 lines
513 B
Agda
module Luau.Value.ToString where
|
|
|
|
open import Agda.Builtin.String using (String)
|
|
open import Agda.Builtin.Float using (primShowFloat)
|
|
open import Agda.Builtin.Bool using (true; false)
|
|
open import Luau.Value using (Value; nil; addr; number; bool)
|
|
open import Luau.Addr.ToString using (addrToString)
|
|
|
|
valueToString : Value → String
|
|
valueToString nil = "nil"
|
|
valueToString (addr a) = addrToString a
|
|
valueToString (number x) = primShowFloat x
|
|
valueToString (bool false) = "false"
|
|
valueToString (bool true) = "true"
|