Skip to content

Commit ace4691

Browse files
committed
Adds additional eta counterexample, which requires a different match case in Converter.agda
1 parent 6b7f8e5 commit ace4691

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/Agda/Core/Checkers/Converter.agda

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ convertWhnf r (TSort s) (TSort t) = convSorts s t
232232
--let and ann shouldn't appear here since they get reduced away
233233
convertWhnf r (TVar _) (TLam _ _) = tcError "implement eta-functions 1"
234234
convertWhnf r (TLam x v) (TVar x') = tcError "implement eta-functions 2"
235+
convertWhnf r (TApp _ _) (TLam _ _) = tcError "implement eta-functions 3"
235236
convertWhnf r _ _ = tcError "two terms are not the same and aren't convertible"
236237

237238
{-# COMPILE AGDA2HS convertWhnf #-}

src/Agda/Core/Rules/Conversion.agda

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ data Conv {α} where
8989
CRedR : @0 ReducesTo v v'
9090
u ≅ v'
9191
u ≅ v
92+
-- TODO : eta
93+
9294

9395
data ConvBranch= α} {c = c} where
9496
CBBranch : (cr1 cr2 : Singleton c) (r1 r2 : Singleton (fieldScope c))

test/EtaFunctionsChurchWithConst.agda

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
data Nat : Set where
2+
Zero : Nat
3+
Suc : Nat Nat
4+
5+
16
Id : (A : Set) (x : A) A Set₁
27
Id = λ A x y (P : A Set) P x P y
38

@@ -19,3 +24,8 @@ eta-functions_three : (A B : Set) (f : A → B) →
1924
eta-functions_three = λ A B λ f refl (A B) f
2025

2126

27+
-- f 0 =?= \x -> f 0 x
28+
-- f : Nat -> Nat -> Nat
29+
30+
eta-app-1 : (f : Nat -> Nat -> Nat) -> Id (Nat -> Nat) (f Zero) (\x -> (f Zero (const Nat x x)))
31+
eta-app-1 = λ f refl (Nat Nat) (f Zero)

0 commit comments

Comments
 (0)