Increasing the print depth in SML/NJ

家住魔仙堡 提交于 2019-11-29 03:22:17

You might wan't to be more precise in the future. You could for example give some sample output and a link to where you found the above.

If I understand your problem correct, then the last line below is your problem? (code snippet

- 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 

Then the Control.Print structure is what you are looking for. So just drop the Compiler part and use

Control.Print.printDepth := 100;

Do note that this is SML/NJ specific and not ml-yacc as such.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!