jon.recoil.org

Module Ocaml_typing.Allowance

type allowed = private
  1. | Allowed
type disallowed = private
  1. | Disallowed
type 'a pos = 'b * 'c constraint 'a = 'b * 'c

Arrange the permissions appropriately for a positive lattice, by doing nothing.

type 'a neg = 'c * 'b constraint 'a = 'b * 'c

Arrange the permissions appropriately for a negative lattice, by swapping left and right.

module type Allow_disallow = sig ... end

Takes a slow but type-correct Allow_disallow module and returns the magic version, which is faster. NOTE: for this to be sound, the functions in the original module must be identity functions (up to runtime representation).