Skip to content

importing Focus and Swiftz cause operators such as ||| to fail to compile #40

@BrianDoig

Description

@BrianDoig
import Swiftz 
import Focus

func fanin<A, B, C>(_ l: @escaping (A) -> C, _ r: @escaping (B) -> C) -> Function<Either<A, B>, C> {
    return Function.arr(l) ||| Function.arr(r)
}

The above fails to compile and there doesn't seem to be a way to specify which library you want the operator to come from since Swiftz.||| fails to compile.

***: error: ambiguous operator declarations found for operator
return Function.arr(l) ||| Function.arr(r)
^
:0: note: found this matching operator declaration
:0: note: found this matching operator declaration
***: error: operator is not a known binary operator
return Function.arr(l) ||| Function.arr(r)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions