1 import Base 2 3 # Pure checkpoint policy. An unset value is represented by the empty string; 4 # the non-empty guard distinguishes disabled injection from an exact match. 5 def nonempty(value: String) -> Bool: 6 match value: 7 case SNil{}: False{} 8 case SCon{_, _}: True{} 9 10 # Handle enabled in the crash injection policy. 11 def enabled(+configured: String, requested: String) -> Bool: 12 Bool.and(nonempty(configured), String.eq(configured, requested))