Verified Commit d71b1850 authored by Camil Staps's avatar Camil Staps 🚀

Copy editing

parent fa1c9f24
......@@ -498,16 +498,23 @@ bs_unique =
{ syntax_title = "uniqueness annotation"
, syntax_patterns = ["\\*", "[", "]", ".", ":"]
, syntax_code =
["*..."
,". ..."
,"v:.. | [v ..]"
[ "*..."
, ". ..."
, "...:... | [...<=...]"
]
, syntax_description = join " "
[ "Annotates a type with its uniqueness."
, "A type can either be unique (`*`), not unique (not annotated), possibly unique (`.`) or relatively unique (identifier and `| [...<=...]`)."
, "\n\nNote that when using unique types in a function or an ADT the container must also be unique."
, "For instance, `T = T (Int, *File)` has to be `T = T *(Int, *File)`."
, "\n\nFunctions have to be split up into arity 1 and the sub functions need to be annotated as well."
, "For instance, `T = T (Int *Int -> *Int)` has to be `T = T (Int -> *(*Int -> *Int))`."
]
, syntax_description = "Annotates a type with its uniqueness. A type can either be unique (`*`), not unique (not annotated), possibly unique (`.`) or relatively unique (identifier and `| [..]`). Note that when using unique types in a function or an ADT the container must also be unique. e.g. `T = T (Int, *File)` has to be `T = T *(Int, *File)`. Functions have to be split up into arity 1 and the sub functions need to be annotated as well. e.g. `T = T (Int *Int -> *Int)` has to be `T = T (Int -> *(*Int -> *Int))`."
, syntax_doc_locations = [CLR 11 "9.1" "_Toc311798093"]
, syntax_examples = map EX
[ "Start :: *World -> *World //World is unique"
, "f :: .a -> .a //f works on unique and non-unique values"
, "f :: v:a u:b -> u:b | [v<=u] //f works when a is less unique than b"
[ "Start :: *World -> *World // World is unique"
, "f :: .a -> .a // f works on unique and non-unique values"
, "f :: v:a u:b -> u:b | [v<=u] // f works when a is less unique than b"
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment