Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify typing rule for App #45

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Agda/Core/Typechecker.agda
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ inferApp ctx u v = do
⟨ x ⟩ (at , rt) ⟨ rtp ⟩ ← reduceToPi r (unType tu)
"couldn't reduce term to a pi type"
gtv ← checkType ctx v at
let sf = piSort (typeSort at) (typeSort rt)
let tytype = substTop r v rt
gc = CRedL rtp CRefl
tytype = substTop r v rt
return (tytype , TyApp gtu gc gtv)
gtu' = TyConv {b = El (typeSort tu) (TPi x at rt)} gtu gc
return (tytype , TyApp gtu' gtv)
{-# COMPILE AGDA2HS inferApp #-}

inferCase : ∀ {@0 cs} Γ d r u bs rt → TCM (Σ[ t ∈ Type α ] Γ ⊢ TCase {x = x} d r u bs rt ∶ t)
Expand Down
3 changes: 1 addition & 2 deletions src/Agda/Core/Typing.agda
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ data TyTerm {α} Γ where

TyApp
: {b : Type α} {@0 r : Rezz α}
→ Γ ⊢ u ∶ a
→ (unType a) ≅ TPi x b c
→ Γ ⊢ u ∶ El k (TPi x b c)
→ Γ ⊢ v ∶ b
------------------------------------
→ Γ ⊢ TApp u v ∶ substTop r v c
Expand Down
Loading