mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-13 13:30:40 +00:00
19 lines
589 B
Agda
19 lines
589 B
Agda
|
{-# OPTIONS --rewriting #-}
|
||
|
|
||
|
module Examples.Run where
|
||
|
|
||
|
open import Agda.Builtin.Equality using (_≡_; refl)
|
||
|
open import Luau.Syntax using (nil; var; _$_; function_⟨_⟩_end; return; _∙_; done)
|
||
|
open import Luau.Value using (nil)
|
||
|
open import Luau.Run using (run; return)
|
||
|
open import Luau.Heap using (emp; lookup-next; next-emp; lookup-next-emp)
|
||
|
|
||
|
import Agda.Builtin.Equality.Rewrite
|
||
|
{-# REWRITE lookup-next next-emp lookup-next-emp #-}
|
||
|
|
||
|
x = var "x"
|
||
|
id = var "id"
|
||
|
|
||
|
ex1 : (run (function "id" ⟨ "x" ⟩ return x ∙ done end ∙ return (id $ nil) ∙ done) ≡ return nil _)
|
||
|
ex1 = refl
|