Module Allowance.Magic_allow_disallow

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).

Parameters

module X : Allow_disallow

Signature

type ('a, 'b, 'd) sided = ('a, 'b, 'd) X.sided
val disallow_right : ('a, 'b, 'l * 'r) sided -> ('a, 'b, 'l * disallowed) sided

Disallows on the right.

val disallow_left : ('a, 'b, 'l * 'r) sided -> ('a, 'b, disallowed * 'r) sided

Disallows a the left.

val allow_right : ('a, 'b, 'l * allowed) sided -> ('a, 'b, 'l * 'r) sided

Generalizes a right-hand-side allowed to be any allowance.

val allow_left : ('a, 'b, allowed * 'r) sided -> ('a, 'b, 'l * 'r) sided

Generalizes a left-hand-side allowed to be any allowance.