luau/prototyping/Examples/Type.agda
2022-02-10 17:03:10 -06:00

21 lines
611 B
Agda
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Examples.Type where
open import Agda.Builtin.Equality using (_≡_; refl)
open import FFI.Data.String using (_++_)
open import Luau.Type using (nil; __; _∩_; _⇒_)
open import Luau.Type.ToString using (typeToString)
ex1 : typeToString(nil) "nil"
ex1 = refl
ex2 : typeToString(nil nil) "(nil) -> nil"
ex2 = refl
ex3 : typeToString(nil (nil nil)) "(nil) -> (nil) -> nil"
ex3 = refl
ex4 : typeToString(nil (nil (nil nil))) "((nil) -> (nil) -> nil)?"
ex4 = refl
ex5 : typeToString(nil ((nil nil) nil)) "(nil) -> ((nil) -> nil)?"
ex5 = refl