2020-05-30 00:40:29 +03:00
|
|
|
import Language.Reflection
|
|
|
|
|
|
|
|
add : TTImp -> TTImp -> TTImp
|
|
|
|
add x y = `(~(x) + ~(y))
|
|
|
|
|
|
|
|
test : TTImp
|
|
|
|
test = add `(3) `(4)
|
|
|
|
|
|
|
|
bigger : TTImp -> TTImp
|
|
|
|
bigger val
|
|
|
|
= `(let xfn : Int -> Int
|
|
|
|
xfn var = var * 2 in
|
|
|
|
xfn ~(val))
|
|
|
|
|
|
|
|
bigger' : Int -> TTImp
|
|
|
|
bigger' val
|
|
|
|
= `(let xfn : Int -> Int
|
|
|
|
xfn var = var * 2 in
|
|
|
|
xfn ~(IPrimVal EmptyFC (I val)))
|
|
|
|
|
|
|
|
bad : Int -> TTImp
|
|
|
|
bad val
|
|
|
|
= `(let xfn : Int -> Int
|
|
|
|
xfn var = var * 2 in
|
|
|
|
xfn ~(val))
|
|
|
|
|
2020-06-01 15:39:18 +03:00
|
|
|
names : List Name
|
2021-01-12 15:23:28 +03:00
|
|
|
names = [ `{ names }, `{ Prelude.(+) } ]
|
2020-09-16 00:29:48 +03:00
|
|
|
|
|
|
|
noExtension : Elab ()
|
|
|
|
noExtension = fail "Should not print this message"
|
|
|
|
|
|
|
|
%runElab noExtension
|
|
|
|
|
|
|
|
%language ElabReflection
|
|
|
|
|
|
|
|
%runElab noExtension
|