[MLton] _pos aka __FILE__ __LINE__ etc

Wesley W. Terpstra wesley at terpstra.ca
Wed Jul 8 07:02:19 PDT 2009


Would anyone else like a _pos language extension that evaluates to the
current file, line, and column? For use in something like: assert (_pos,
"Bad mojo", x < j)

It could return "foo.sml:4.2" or maybe ("foo.sml", 4, 2) or even
("/home/terpstra/BubbleStorm/demo/foo.sml", 4, 2).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton/attachments/20090708/edccc9f4/attachment.html


More information about the MLton mailing list