Last active
January 18, 2020 21:32
-
-
Save xekoukou/49163a8ad52197fd6c4826c161b29721 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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