Mercurial > urweb
comparison lib/ur/top.ur @ 2152:2d9e40e726f2
Adjust new [assert] to work properly from top.ur
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 03 Jun 2015 09:55:37 -0400 |
parents | 4cd36865e0b5 |
children |
comparison
equal
deleted
inserted
replaced
2151:4cd36865e0b5 | 2152:2d9e40e726f2 |
---|---|
410 if x > y then x else y | 410 if x > y then x else y |
411 fun min [t] ( _ : ord t) (x : t) (y : t) : t = | 411 fun min [t] ( _ : ord t) (x : t) (y : t) : t = |
412 if x < y then x else y | 412 if x < y then x else y |
413 | 413 |
414 fun assert [a] (cond: bool) (msg: string) (loc: string) (x:a): a = | 414 fun assert [a] (cond: bool) (msg: string) (loc: string) (x:a): a = |
415 if cond then x else error <xml>{[msg]} at {[loc]}</xml> | 415 if cond then x else error <xml>{txt msg} at {txt loc}</xml> |