GaloisInc / cryptol

Cryptol: The Language of Cryptography
https://galoisinc.github.io/cryptol/master/RefMan.html
BSD 3-Clause "New" or "Revised" License
1.14k stars 126 forks source link

`sum-types`: What should the `private` keyword do for constructors? #1610

Closed RyanGlScott closed 10 months ago

RyanGlScott commented 10 months ago

On the sum-types branch (#1602), it is possible to annotate a constructor as private. Currently, this does nothing, and private constructors are exported anyway. It's unclear if we actually want the ability to mark enum constructors as private however—what does it mean to only export some of an enum's constructors?

We should come to a conclusion about what design we want and either (1) implement the feature, or (2) remove it.

RyanGlScott commented 10 months ago

We opted to remove this for now in https://github.com/GaloisInc/cryptol/commit/8abf33f69b35ec3a230d0ef110014e66615d2e7b. We can always add this back later if someone requests it.