-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Consider this code :
open import Agda.Builtin.Reflection
open import Reflection
open import Prelude.Nat
open import Prelude.Bool
open import Prelude.Unit
open import Prelude.List
open import Tactic.Reflection.Substitute
fff : Term
fff = pat-lam [ clause ( arg (arg-info visible relevant) (var "a")
∷ (arg (arg-info visible relevant) (var "b"))
∷ []) (var 0 [ arg (arg-info visible relevant) (var 2 []) ]) ] []
ggg : Term
ggg = substTerm (safe (def (quote Nat) []) _ ∷ []) fff
postulate
B : Term → Set
aaa : B ggg
aaa = {!!}
Inspecting the hole with normalization gives this output :
Goal: B
(pat-lam
[
clause (vArg (var "a") ∷ [ vArg (var "b") ])
(var 1 [ vArg (def (quote Nat) []) ])
]
[])
There seem to be at least two errors in the algorithm :
a. https://github.com/UlfNorell/agda-prelude/blob/master/src/Tactic/Reflection/Substitute.agda#L79
b. https://github.com/UlfNorell/agda-prelude/blob/master/src/Tactic/Reflection/Substitute.agda#L101
The example shows the "b" error. You should not use reverse.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels