I'm new to Standard ML and I'm trying to get my head around the SML/NJ runtime environment. I want to adapt it to my needs. Specifically, I want to:
- Use IntInf by default
- Prevent it from truncating strings and IntInf to 70 characters.
Here's what I've found in my 8+ hours reading documentation and experimenting.
I can overload IntInf on top of int with the command
open IntInf;
I can control how many characters in a string are displayed with the variable Control.Print.stringDepth. For example, this will let it display 1000 characters before truncating:
Control.Print.stringDepth := 1000;
How do I do the same for IntInf values? Can I set the depth to be infinite (that is, no truncation at all)?
Is opening IntInf the best way to overload int with IntInf?
Finally, how to I make this all load automatically at runtime so that when I invoke "sml" it's in my default environment?
Edit: I've since found out there is an option called Control.Print.intinfDepth that can be set to a large number (say, 999999). I don't know how to make it infinite, though.
My other questions still remain unanswered.
Edit: I ran across this set of SML/NJ customizations for a class at Kansas State. To display my own banner message and avoid displaying "val it = true : bool" I need to test the return value of SMLofNJ.exportML. If it's true, the heap image was just restored (ie, started up) and I can display a message. If it's false, the heap image was just saved.