on master help sign in
Added type spear to debugging info
commita7c64199f5c47b820c58ac927df15cd7763db101 authorDavid Kerschner <dkerschner@hcoop.net> dateWed 8 May 2019, 12:08 (7 years ago) parent67ee813
1 file changed+7
learn/hoon/hoon-tutorial/hoon-syntax.udon+7
learn/hoon/hoon-tutorial/hoon-syntax.udon+7
@@ -324,6 +324,13 @@ There are a couple useful runes associated with debugging:
324324
325325`~&` (sigpam) is used to print its argument every time that argument executes. So, if you wanted to see how many times your program executed `foo`, you would write `foo bar`. Then, when your program runs, it will print `foo` on a new line of output every time the program comes across it by recursion.
326326
327+`-:!>` is known as the type spear. Given an expression, it will produce the type information for the expression. This can be useful for verifying assumptions about the types of expressions.
328+
329+```
330+> -:!>(1)
331+#t/@ud
332+```
333+
327334But there are more. Check out the aforementioned [troubleshooting](/docs/reference/troubleshooting/) page to see other handy debugging runes and how to use them.
328335
329336### [Next Lesson: The Subject and Its Legs](../the-subect-and-its-legs)