Skip to content

make interchange, currying etc systematic #28

@JosephNathaniel

Description

@JosephNathaniel

The types associated to our typed lambda expressions often need to be curried, uncurried, interchanged, etc.

The way that these type-juggling operations are currently implemented can be a bit hacky -- e.g. see this instance in our code where we have a try/except block that first tries one thing and then if the types don't work out, tries the interchanged version.

image

It would be good to figure out how to deal with these type juggling operations systematically. I am unsure if this would be a straightforward adjustment, or if it would require more work.

One tentative idea to deal with interchange is to express it via typed closed lambda terms (combinators).
E.g. if we want to convert a term of type (a->b)x(c->d) to axc->bxd, this can be done by feeding the original term into a combinator (a->b)x(c->d)->(axc->bxd).

Metadata

Metadata

Assignees

No one assigned

    Labels

    conceptualRequires some thinking about the underlying technical theoryenhancementNew feature or request

    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