Linearity and uniqueness

In the last post , we looked at uniqueness mode and how uniqueness may be used to optimise. As we will see, uniqueness alone is insufficient in practice, and we also need a concept of linearity for uniqueness to be useful. Capturing unique values Let’s start with an example. Recall the signature of the unique reference module. module type Unique_ref = sig type ' a t val alloc : ' a -> ' a t @ unique val free : ' a t @ unique -> unit val get : ' a t @ unique -> ' a Modes . Aliased . t * ' a t @ unique val se

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论