增加SML/NJ中的打印深度
我正试图让SML/NJ打印出最高级别的结果,而不是 到处张贴#标志 根据一些老文件(以及2001年在本新闻组的一篇文章),它 应该可以使用增加SML/NJ中的打印深度,sml,smlnj,Sml,Smlnj,我正试图让SML/NJ打印出最高级别的结果,而不是 到处张贴#标志 根据一些老文件(以及2001年在本新闻组的一篇文章),它 应该可以使用Compiler.Control.Print.printDepth 但是,在SML/NJ 110.7版上,这只是给出了一个错误: - Compiler.Control.Print.printDepth := 100; stdIn:1.1-30.8 Error: unbound structure: Control in path Compiler.Contro
Compiler.Control.Print.printDepth
但是,在SML/NJ 110.7版上,这只是给出了一个错误:
- Compiler.Control.Print.printDepth := 100;
stdIn:1.1-30.8 Error: unbound structure: Control in path Compiler.Control.Print.printDepth
你以后可能不想说得更准确些。例如,您可以给出一些示例输出和指向找到上述内容的链接 如果我理解你的问题是正确的,那么下面最后一行就是你的问题?(代码段)
- datatype tree = leaf | node of int * tree * tree;
datatype tree = leaf | node of int * tree * tree
- val t = node (1, node (2, node (3, leaf, leaf), leaf), leaf);
val t = node (1,node (2,node #,leaf),leaf) : tree
那么结构就是您要寻找的。所以只需删除编译器部分,然后使用
Control.Print.printDepth := 100;
请注意,这是SML/NJ特定的,而不是ml yacc本身