Skip to content

Instantly share code, notes, and snippets.

@xekoukou
Last active January 18, 2020 21:32
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/49163a8ad52197fd6c4826c161b29721 to your computer and use it in GitHub Desktop.
Save xekoukou/49163a8ad52197fd6c4826c161b29721 to your computer and use it in GitHub Desktop.
module test where
open import Agda.Builtin.Reflection
open import Reflection
open import Prelude.Nat
open import Prelude.Bool
open import Prelude.Unit
open import Prelude.List
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