Ante is a low-level functional language for exploring refinement types, lifetime inference, and other fun features. In general, ante is low-level (no GC, values aren't boxed by default) while also trying to be as readable as possible by encouraging high-level approaches that can be optimized with low-level details later on.
Example:
//The 'ante' keyword declares compile-time values
ante
labels = global mut empty Map
goto lbl =
label = lookup labels lbl ?
None -> Ante.error "Cannot goto undefined label ${lbl}"
Llvm.setInsertPoint (getCallSiteBlock ())
Llvm.createBr label
label name:Str =
callingFn = getParentFn (getCallSiteBlock ())
lbl = Llvm.BasicBlock(Ante.llvm_ctxt, callingFn)
labels#name := lbl
//test it out
label "begin"
print "hello!"
goto "begin"
Last modified 16 December 2024