Ah! Like this? import macros macro exampleMacro(): untyped = error("This is a compile-time error") exampleMacro()