From 7055b353a9ff1d037d82ccbdcbe70a423b4e64e4 Mon Sep 17 00:00:00 2001 From: programsnail Date: Sun, 21 Apr 2024 07:50:17 +0300 Subject: [PATCH] update readme --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..82058d7 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Check of modes correctness + +## Info + +https://blog.janestreet.com/oxidizing-ocaml-locality/ +https://blog.janestreet.com/oxidizing-ocaml-ownership/ + +- **locality:** *global* (default) or *local* (value should not be passed out of context, can be allocated on stach) + +- **uniqueness:** *shared* (default), *unique* (used only once, consumed), *exclusive* (used only once in the same time) + +- **linearity:** *many* (default), *once* (result value can be used by caller only once), *separated* (result value can be used by caller only once in the same time) + +## Done + +- *unique* check + +- *exclusive* check +- *local* check +- *once* check +- *separated* check +- type check (optional) + +## Examples + +- *unique:* let f (unique x) = x * x in f;; -> error