2 import "JavaBuiltin" as Java
4 importJava "java.lang.System" where
5 nanoTime :: () -> <Proc> Long
8 Executes the expression and returns the result
9 together with execution time in seconds.
11 time :: (<e> a) -> <Proc,e> (a,Double)
13 beginTime = nanoTime ()
16 (result, Java.l2d (endTime-beginTime) * 1e-9)
19 Prints the given text and returns
22 trace :: String -> a -> a
23 trace text value = runProc do
28 Prints the given value and returns
31 traceShow :: Show a => a -> b -> b
32 traceShow p v = trace (show p) v