mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 09:12:34 +03:00
20 lines
283 B
Idris
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
|