@@ -50,17 +50,39 @@ Use the `Maybe` or `Either` libraries instead.
5050crash : String -> a
5151crash = Native.Error.raise
5252
53−{-| Watch a particular value in the reactive debugger.
53+{-| Watch a particular value in the debugger. Say we want to know the value of
54+a variable called `velocity` because it may not be updated correctly. Adding
55+`Debug.watch` allows us to name the value and show it with the debugger.
56+
57+ Debug.watch "velocity" velocity == velocity
58+
59+Notice that the result of evaluating this expression is exactly the same as
60+not having the expression at all. That means it's easy to add to any value.
5461-}
5562watch : String -> a -> a
5663watch = Native.Debug.watch
5764
58−{-| Watch a particular value in the reactive debugger.
65+{-| Watch a summary of a particular value in the debugger. This function is
66+pretty much the same as `watch` but it lets you specify a way to summarize
67+the value you are interested in. For example, maybe you only want to see part
68+of a record:
69+
70+ Debug.watchSummary "velocity" .velocity object
71+
72+This is the same as just writing `object`, but it creates a watch that *only*
73+looks at the value of `object.velocity`. You can also show summary statistics
74+like length of a list:
75+
76+ Debug.watchSummary "Number of clicks" length clicks
77+
78+Again, this evaluates to `clicks` but we get to see how long that list is in
79+the debugger.
5980-}
6081watchSummary : String -> (a -> b) -> a -> a
6182watchSummary = Native.Debug.watchSummary
6283
63−{-| Trace a Form over time in the reactive debugger.
84+{-| Trace all past positions of a `Form` in the debugger. Add this to a `Form`
85+and you will see a line tracing its entire history.
6486-}
6587trace : String -> Form -> Form
6688trace = Native.Debug.tracePath