Idris2/tests/idris2/reflection005/refdecl.idr
2020-06-01 19:13:46 +01:00

14 lines
229 B
Idris

import Language.Reflection
%language ElabReflection
mkDecls : TTImp -> Elab ()
mkDecls v
= declare `[ mkMult : Int -> Int
mkMult x = x * ~(v) ]
%runElab mkDecls `(94)
bad : a
bad = %runElab mkDecls `(94)