File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -239,8 +239,7 @@ convertWhnf r functionTerm (TLam x b) =
239239 do
240240 conversionProof <- convertCheck newScope b term
241241 return (CEtaFunctions x functionTerm b conversionProof)
242- -- convertWhnf r (TLam x v) (TVar x') = tcError "implement eta-functions 2"
243- -- convertWhnf r (TApp _ _) (TLam _ _) = tcError "implement eta-functions 3"
242+ convertWhnf r (TLam x v) (TVar x') = tcError "implement eta-functions 2"
244243convertWhnf r _ _ = tcError "two terms are not the same and aren't convertible"
245244
246245{-# COMPILE AGDA2HS convertWhnf #-}
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ data Nat : Set where
1515comp : (A B C : Set ) → (B → C) → (A → B) → A → C
1616comp = λ (A B C : Set ) → λ f → λ g → λ x → f (g x)
1717
18- const : Nat → Nat → Nat
19- const = λ x → λ y → x
18+ const : (A : Set ) → A → A → A
19+ const = λ A → λ x → λ y → x
2020
2121addOne : Nat -> Nat
2222addOne = suc
@@ -27,9 +27,9 @@ addTwo = λ x → (suc (suc x))
2727addTwoAfterAddOne : Nat → Nat
2828addTwoAfterAddOne = λ x → (comp Nat Nat Nat addTwo addOne x)
2929
30- eta-higher : (A B C : Set ) → (f : A → B → C) → (λ x → λ y → f x y) ≡ f
30+ eta-higher : (A B C : Set ) → (f : A → B → C) → (λ x → λ y → f (const A x x) y) ≡ f
3131eta-higher = λ A B C → λ f → refl
3232
33- eta-counterexample-simple : addOne ≡ (λ x → (suc (const x x)))
33+ eta-counterexample-simple : addOne ≡ (λ x → (suc (const Nat x x)))
3434eta-counterexample-simple = refl
3535
You can’t perform that action at this time.
0 commit comments