Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

showFailure logic could be simplified #485

Description

@patrickt

Ported from tree-sitter/haskell-tree-sitter#149.

We could simplify this logic (and the similar logic over :+:s in the generic counterpart) by changing showFailure to take Maybe Node instead of Node. Then we could do fail $ showFailure (Proxy @(Either a b)) currentNode on this line, and on the line above, we wouldn’t need to return node as part of the triple since the later calls to showFailure could use the original binding of currentNode :: Maybe Node from the first line of the do-block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ast:codegenBugs in Template Haskell AST generation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions