Idris2/tests/idris2/reflection005/refdecl.idr

14 lines
229 B
Idris
Raw Normal View History

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)