Skip to content

Allow commas in inline %foreign #7

@joelberkeley

Description

@joelberkeley

The following function fails

%foreign "python: lambda x, y: (x, y)"
tuple : Int -> Int -> PythonClass   -- or PythonObject, unsure

because the string after %foreign is split by commas (see [here](https://github.com/idris-lang/Idris2/blob/8bfe6b92fc0f9f28c4922f0aeb21020084212c74/src/Compiler/Common.idr#L467-L498 and here).

That said, the above is a bad example cos you can lambda *a: a.

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