core.patterns-exhaustive
- description
- Whether the patterns cover every value of type. Nested patterns are checked recursively against the payload types
- type
Fn(patterns: List<@core.pattern>, type: @core.type-ast, env: @core.type-env) -> Boolean
- expression
fn(patterns$0, type$1, env$2) => match @core.patterns-any-irrefutable(patterns: $0, index: 0) { true => true, false => let variants$10 = @core.pattern-target-variants(type: $1, env: $2); match @core.list-get(list: $10, index: 0) { #none(_) => false, #some(_) => @core.patterns-cover-variants(patterns: $0, variants: $10, env: $2, index: 0) } }
- visibility
- public
core.patterns-exhaustive (project definy, branch compiled-tests, snapshot i6TqClmqVS9FK8rKOvJ43l6Tevx8pvYJ5-zaQqNwemc) id: _qt70t_dV-GvAyL_kLvRJnk_9XjvXzgzw26fGPb20Ew content hash: 97_OCgVWjh_x4kOnbZTxo5JxAZSDSC4Wnv0KxG9jdOU