jon.recoil.org

Module Allowance.Magic_allow_disallowSource

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

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

Disallows on the right.

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

Disallows a the left.

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

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

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

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