on master help sign in
Added type spear to debugging info
a7c6419David Kerschner
learn/hoon/hoon-tutorial/hoon-syntax.udon+7
@@ -324,6 +324,13 @@ There are a couple useful runes associated with debugging:
324
324
325`~&` (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.
325`~&` (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.
326
326
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+
327But there are more. Check out the aforementioned [troubleshooting](/docs/reference/troubleshooting/) page to see other handy debugging runes and how to use them.
334But there are more. Check out the aforementioned [troubleshooting](/docs/reference/troubleshooting/) page to see other handy debugging runes and how to use them.
328
335
329### [Next Lesson: The Subject and Its Legs](../the-subect-and-its-legs)
336### [Next Lesson: The Subject and Its Legs](../the-subect-and-its-legs)