Skip to content

Instantly share code, notes, and snippets.

@xekoukou
Created January 18, 2020 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xekoukou/bba40c1149baa3586621fa3a37e6b4f7 to your computer and use it in GitHub Desktop.
Save xekoukou/bba40c1149baa3586621fa3a37e6b4f7 to your computer and use it in GitHub Desktop.
module test where
open import Reflection
open import Agda.Builtin.Reflection
open import Agda.Builtin.Word
open import Agda.Builtin.Float
open import Agda.Builtin.Char
open import Prelude.List
open import Prelude.Maybe
open import Prelude.Nat
open import Prelude.Ord
open import Prelude.Equality
open import Prelude.Show
open import Prelude.Semiring
open import Prelude.Function
open import Prelude.Unit
open import Prelude.Sum
open import Prelude.Bool
open import Prelude.Product
open import Tactic.Reflection
open import Tactic.Reflection.Equality
open import Tactic.Reflection.DeBruijn
open import Tactic.Reflection.Substitute
pat : Term
pat = pat-lam [ clause [ arg (arg-info visible relevant) (var "ii") ] (def (quote Bool) []) ] [ arg (arg-info visible relevant) (var 0 []) ]
macro
mm : Term → TC ⊤
mm hole
= do
inContext (arg (arg-info visible relevant) (def (quote Nat) []) ∷ [])
(do
t ← reduce pat
typeError (termErr t ∷ termErr pat ∷ [])
)
test : ⊤
test = mm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment