@@ -6,7 +6,9 @@
6 tools/hoon -f expr.hoon
6 tools/hoon -f expr.hoon
8The program is `!: => <library> <expression>`, run by `urbit eval`,
8The program is `!: => <library> <expression>`, run by `urbit eval`,
9−so every arm of the library, and the standard library, is in scope. The
9+so every arm of the library, and the standard library, is in scope.
10+`!:` gives errors their positions but makes the checker run 2.2 to 2.6
11+times slower than on a ship; --no-debug leaves it out, for timings. The
10result is printed as Hoon prints it, without colours; --raw prints a
12result is printed as Hoon prints it, without colours; --raw prints a
11cord's or tape's text instead. Errors and crashes are printed with
13cord's or tape's text instead. Errors and crashes are printed with
12their positions mapped back to the library or the expression, and an
14their positions mapped back to the library or the expression, and an
@@ -102,6 +104,10 @@ def main(argv):
102 "expression to use; repeatable")
104 "expression to use; repeatable")
103 ap.add_argument('--timeout', type=float, default=600, metavar='SECONDS',
105 ap.add_argument('--timeout', type=float, default=600, metavar='SECONDS',
104 help='how long urbit eval may run (default: 600)')
106 help='how long urbit eval may run (default: 600)')
107+ ap.add_argument('--no-debug', dest='debug', action='store_false',
108+ help="leave out !:, so the checker runs at a ship's "
109+ "speed, for timings; errors then have no "
105 ap.add_argument('--save-program', metavar='FILE',
111 ap.add_argument('--save-program', metavar='FILE',
106 help='also write the generated Hoon program to FILE')
112 help='also write the generated Hoon program to FILE')
107 opts = ap.parse_args(argv)
113 opts = ap.parse_args(argv)
@@ -119,7 +125,7 @@ def main(argv):
119 expr, name = opts.expr, '(expression)'
125 expr, name = opts.expr, '(expression)'
120 if not expr.strip():
126 if not expr.strip():
121 raise ue.ToolError('the expression is empty')
127 raise ue.ToolError('the expression is empty')
122− prog = ue.library_program(opts.lib)
128+ prog = ue.library_program(opts.lib, debug=opts.debug)
123 for spec in opts.cord:
129 for spec in opts.cord:
124 line, cname = cord_binding(spec)
130 line, cname = cord_binding(spec)
125 prog.add(line, '(--cord %s)' % cname, 'harness')
131 prog.add(line, '(--cord %s)' % cname, 'harness')