Skip to content

Wrong "partial match" error for lists #7

@TuongNM

Description

@TuongNM

The following code should match all possible cases:

isEmptyList =
    \case of
    []: "empty list";
    x::xs: "non-empty list with head: \(x) and tail: \(xs)"
    esac;

The empty list as well as any list with at least one element is covered. But yeti produces an error.

Partial match: []

I guess the code analyzer for pattern matching on lists needs to check for the cases where the empty list as well as "x::xs"-llike constructs are present and thereby recognize that all possible list cases have been matched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions