core.patterns-cover-variant
- description
- Whether the patterns cover every value with the tag
- type
Fn( patterns: List<@core.pattern>, variant: Record{tag: String, payload_type: Union{#none, #some(@core.type-ast)}}, env: @core.type-env ) -> Boolean
- expression
fn(patterns$0, variant$1, env$2) => let subs$10 = @core.patterns-sub-patterns(patterns: $0, tag: $1.tag, index: 0, acc: []); match @core.list-get(list: $10, index: 0) { #none(_) => false, #some(_) => match $1.payload_type { #none(_) => true, #some(payload_type$12) => @core.patterns-exhaustive(patterns: $10, type: $12, env: $2) } }
- visibility
- public
core.patterns-cover-variant (project definy, branch auto-release, snapshot oiQgPqhJm-TbM4kexXeRHBaJB_tS7gwBSewII64P-44) id: t_tllVL0_yP21_we9ETBZn85T2nC-pgQnxJ-xPxtLwc content hash: brwx5BYEasI2JYVX5mO7Nf80ncdSW41OvtDPqkI8tWU