Skip to content

Wingman should notice variables already used, outside of the hole #1704

Closed
@isovector

Description

@isovector
test :: (a -> b -> b) -> b -> [a] -> b
test _ b [] = b
test f_b b (a : l_a4) = f_b a $ test f_b b _

Wingman wants to fill this hole with a : l_a4, since it uses more variables from the hypothesis. But it doesn't pay attention to the expression context, where it could learn that a has already been used.

This is not hard to fix --- subtract used-in-context variables from syn_used_vals before scoring.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions