Some FSharpWrapper operators conflict with built-in F# operators
- Dominant language
- C#
- Stars
- 1.6k
- Forks
- 240
- PR merge metrics
- No merged PRs in 30d
Description
Operators `>>` and `<<` defined in `src\FSharpWrapper\FSharpWrapper.fs`
conflict with built-in F# function composition operators.
Example. The following code:
```fsharp
open Microsoft.ML.Probabilistic.FSharp
let f2 x = x * 2
let f3 x = x * 3
let f6 = f2 >> f3
```
results in the compiler error:
```
error FS0001: Expecting a type supporting the operator '>' but given a function
type. You may be missing an argument to a function.
```
If we comment out `open Microsoft.ML.Probabilistic.FSharp` then it compiles.
But then it is harder to work with F# wrapper features, especially operators.
If the choice of operators was not an intentional design decision with
awareness of the conflicts, can these operators be changed?
Contributor guide
Research direction
Start in src\FSharpWrapper\FSharpWrapper.fs and reproduce the reported conflict by opening Microsoft.ML.Probabilistic.FSharp and composing f2 and f3 with >>. Determine whether the operator definitions can be changed without losing the F# wrapper functionality, then verify that the example compiles while the wrapper operators remain available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100