Skip to content

Commit abdc640

Browse files
committed
def: banish make-eta-expansion
1 parent 9c1a6d0 commit abdc640

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/1Lab/Reflection/Copattern.agda

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,6 @@ The `define-eta-expansion` macro will automatically construct a function
142142
`R p → R q` that eta-expands the first record out into a copattern definition.
143143
-}
144144

145-
make-eta-expansion : Name Maybe Name TC Term TC ⊤
146-
make-eta-expansion nm lemma? make-tp = do
147-
tp make-tp
148-
-- Get the type of the predeclared binding.
149-
-- Next, grab the telescope, and use it to construct a function
150-
-- that simply returns the last argument with the provided
151-
-- lemma applied.
152-
let tele , _ = pi-view tp
153-
let tm = case lemma? of λ where
154-
(just lemma) tel→lam tele (def lemma (argN (var 0 []) ∷ []))
155-
nothing tel→lam tele (var 0 [])
156-
make-copattern false nm tm tp
157-
158145
define-eta-expansion : Name TC ⊤
159146
define-eta-expansion nm = do
160147
tp reduce =<< infer-type (def nm [])

0 commit comments

Comments
 (0)