-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSemantics.agda
More file actions
21 lines (17 loc) · 781 Bytes
/
Semantics.agda
File metadata and controls
21 lines (17 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
open import Relation.Binary.PropositionalEquality
open import Relation.Binary
open import Relation.Nullary.Decidable
module STLC.Semantics {U} (UEq : IsDecEquivalence {A = U} _≡_) (El : U → Set) where
open import STLC.Typing U
open import STLC.Syntax Type as Raw
open import STLC.Scopecheck Type as Scope
open import STLC.Typecheck UEq as TC
open import STLC.Embed El
open import STLC.Embedded
open import Data.Vec
open import Data.Product
semantics : (E : Raw.Expr) →
{scope-prf : True (Scope.check [] E)} → let E′ = proj₁ (toWitness scope-prf) in
{type-prf : True (TC.infer [] E′)} → let τ = proj₁ (toWitness type-prf) in
embed-type τ
semantics E {scope-prf} {type-prf} = eval₀ (embed (proj₂ (toWitness type-prf)))