Idris2/tests/idris2/reflection/reflection019/ElabScriptWarning.idr
2023-09-07 14:57:22 +01:00

20 lines
283 B
Idris

module ElabScriptWarning
import Language.Reflection
%language ElabReflection
showsWarning : a -> b -> Elab c
showsWarning x y = do
x' <- quote x
warnAt (getFC x') "The first argument worth a warning"
check =<< quote y
x : Nat
x = %runElab showsWarning "Suspicious" 15