我 Java 我将此附加到我的打印语句中,并且它们有一个堆栈跟踪...
public static int getLineNumber() {
// The second row of the stack trace had the caller file name, etc.
return Thread.currentThread().getStackTrace()[2];
}
Run Code Online (Sandbox Code Playgroud)
我怎么做这是 Haskell?