theolaurent / ocaml-reagent

An implementation of reagents for multicore OCaml
ISC License
4 stars 0 forks source link

Cas clean #15

Closed kayceesrk closed 9 years ago

kayceesrk commented 9 years ago

Simple fix to avoid exposing the constructor out of the CAS module.

theolaurent commented 9 years ago

Humm.. There is no more ways to produce values of type CAS.t... I mean except for those in the module Sugar, but this module is supposed to be facultative. The CAS constructor was actually meant to be exposed. Or we could have a create function of type 'a ref -> 'a updt -> t. But that would be the same, wouldn't be ?

kayceesrk commented 9 years ago

Better to expose a function cas : 'a ref -> 'a updt -> t than the constructor. Exposing the constructor breaks abstraction.

theolaurent commented 9 years ago

Ok. Could you just add it?

kayceesrk commented 9 years ago

Added.