links-lang / links

Links: Linking Theory to Practice for the Web
http://www.links-lang.org
Other
332 stars 42 forks source link

Fix the usage of linear variables in handlers #1162

Closed thwfhk closed 1 year ago

thwfhk commented 2 years ago

This PR fixes the issue #1161 as well as some other problems of using linear variables in handlers:

  1. Fix the usage counting of variables from environment in handler clauses;
  2. Check the usage times of linear parameters of handler clauses;
  3. Prohibit the usage of linear variables from environment in deep handlers.

Also, it moves the definition of module Timestamp in commonTypes.ml to a more reasonable position.

thwfhk commented 1 year ago

Probably ready to merge now?