Skip to content

Commit 6b7f8e5

Browse files
committed
Marks place in code where eta-functions conversion should happen ; Add two more counterexamples for eta-functions ; spelling fixes
1 parent deebf43 commit 6b7f8e5

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

src/Agda/Core/Checkers/Converter.agda

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ convertWhnf r (TCase d ri u bs rt) (TCase d' ri' u' bs' rt') =
229229
convertCase r d d' ri ri' u u' bs bs' rt rt'
230230
convertWhnf r (TPi x tu tv) (TPi y tw tz) = convPis r x y tu tw tv tz
231231
convertWhnf r (TSort s) (TSort t) = convSorts s t
232-
--let and ann shoudln't appear here since they get reduced away
232+
--let and ann shouldn't appear here since they get reduced away
233+
convertWhnf r (TVar _) (TLam _ _) = tcError "implement eta-functions 1"
234+
convertWhnf r (TLam x v) (TVar x') = tcError "implement eta-functions 2"
233235
convertWhnf r _ _ = tcError "two terms are not the same and aren't convertible"
234236

235237
{-# COMPILE AGDA2HS convertWhnf #-}

src/Agda/Core/Checkers/TypeCheck.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ inferCase {α = α} ctx d rixs u bs rt = do
8787

8888
El s tu , gtu inferType ctx u
8989
d' , (params , ixs) ⟨ rp ⟩ reduceToData r tu
90-
"can't typecheck a constrctor with a type that isn't a def application"
90+
"can't typecheck a constructor with a type that isn't a def application"
9191
Erased refl convNamesIn d d'
9292
df ⟨ deq ⟩ tcmGetDatatype d
9393
let ds : Sort α

src/Agda/Core/Rules/Unification.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ private open module @0 G = Globals globals
1414
{- PART ONE : Shrinking -}
1515
---------------------------------------------------------------------------------------------------
1616
module Shrinking where
17-
{- A module where shrinking, an operation to remove some variables of a scope while
18-
preserving dependancies is defined -}
17+
{- A module where shrinking is defined, which is an operation to remove some variables of a scope while
18+
preserving dependencies-}
1919

2020
private variable
2121
@0 x : Name

test/EtaFunctionsChurchWithConst.agda

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,12 @@ const = λ A → λ x → λ y → x
1010
eta-functions_expl : (A B : Set) (f : A B) (Id (A B) f (λ x (f (const A x x))))
1111
eta-functions_expl = λ A B λ f refl (A B) f
1212

13+
eta-functions_two : (A B : Set) (f : A B)
14+
(Id (A B) (λ x (f (const A x x))) (λ v (λ w (f w)) v) )
15+
eta-functions_two = λ A B λ f refl (A B) f
16+
17+
eta-functions_three : (A B : Set) (f : A B)
18+
(Id (A B) (λ v (λ w (f w)) v) (λ x (f (const A x x))) )
19+
eta-functions_three = λ A B λ f refl (A B) f
1320

1421

0 commit comments

Comments
 (0)