File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -244,9 +244,18 @@ convertWhnf r (TSort s) (TSort t) = convSorts s t
244244-- -- (x : Name) (f : NameIn α)
245245-- -- (b : Term x ▸ α) (proof : b ≅ TApp (TVar depPairF) (TVar depPairX) )
246246-- return (CEtaVar x f b proof)
247- convertWhnf r (TVar f) (TLam x b) = {!!}
248- convertWhnf r (TLam x v) (TVar x') = tcError "implement eta-functions 2"
249- convertWhnf r (TApp _ _) (TLam _ _) = tcError "implement eta-functions 3"
247+ convertWhnf r functionTerm (TLam x b) =
248+ let
249+ depPairX = ⟨ x ⟩ (Zero ⟨ IsZero refl ⟩)
250+ subsetProof = (subWeaken subRefl)
251+ newScope = singBind r
252+ term = TApp (weakenTerm subsetProof functionTerm) (TVar depPairX)
253+ in
254+ do
255+ conversionProof <- convertCheck newScope b term
256+ return (CEtaVar2 x functionTerm b conversionProof)
257+ -- convertWhnf r (TLam x v) (TVar x') = tcError "implement eta-functions 2"
258+ -- convertWhnf r (TApp _ _) (TLam _ _) = tcError "implement eta-functions 3"
250259convertWhnf r _ _ = tcError "two terms are not the same and aren't convertible"
251260
252261{-# COMPILE AGDA2HS convertWhnf #-}
You can’t perform that action at this time.
0 commit comments