implements invariant syntax
  -- this doesn't work due to a bug in contracts.js
  -- macros expand correctly, though