Inform 7: Using kinds of actions with extended going

I am trying to use a Kind of action (section 7.15 of the manual) with going from certain places (section 7.13) by I seem to keep getting errors. Is this a bug? Is there a better way of doing this?

[code]Main Street West is a room. Main Street East is east of Main Street West.

Going west from Main Street West is leaving town. Going east from Main Street East is leaving town.

Instead of leaving town, say “There is nothing further that way.”[/code]

A little tricky, but since there is no westward connection from Main Street West, “Going west from Main Street West” is not recognized as a valid action and therefore not able to be categorized as a kind of action. You want to use “in” in this case:

Going west in Main Street West is leaving town. Going east in Main Street East is leaving town.

EDIT: The code above works, but the reason given isn’t correct; even if one adds a valid westward connection, your original code still fails to compile. This does appear to be a hole in the implementation of the compiler’s understanding of the whole “going in / from / etc…” when used in conjunction with kinds of action (i.e. a bug which should be reported).

What exactly are the sorts of actions that can be made into kinds of action? Section 7.15 doesn’t really say. Going west in [some room] works, and this works too:

Singing in the northern room is pleasant action.

But it doesn’t seem to be “anything you can put in a rule header,” because though this works once I’ve defined weapons as a kind and weapon name as a text that weapons have:

 Before dropping a weapon when the weapon name of the noun is "sharp dagger", say "If you must..."

this does not work:

Dropping a weapon when the weapon name of the noun is "sharp dagger" is dangerous action. Before dangerous action, say "If you must..."

Now I can do this:

Definition: a weapon is pointy if the weapon name of the item described is "sharp dagger". Dropping a pointy weapon is dangerous action. Before dangerous action, say "If you must..."

but I’m curious to know what I can and can’t do here.

Here’s my wild guess: you can’t use “when” in a kind-of-action definition, nor can you use action variables via “matched as” (e.g. any of the exotic “going” conditions).

In fact if you try “Singing when in the northern room is pleasing action” you get an error message indicating that you can’t use “when” in kinds of action.