fsprojects / fsprojects/FSharpPlus
Slow compiler performance in Monad Transformers sample with Visual Studio, and can't give hints.
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 941
- Forks
- 106
- PR merge metrics
- No merged PRs in 30d
Description
When I try Monad Tranformers sample with Visual Studio 2015 along with F# PowerTools, I noticed that the CPU peaks when IDE sits idle, probably due to type inference engine and syntax colorization is delayed for few seconds.
I am not sure if this issue is related to F# compiler , VisualFSharp or FSharpPlus. Can you suggest me any workarounds like putting a hint to make IDE happy for better performance ?
Also when I explicitly give type like below:
let getValidPassword : ErrorT<Async<_>> =
monad {
let! s = liftAsync getLine
if isValid s then return s
else return! throw -1
}
</ catch /> (fun s -> throw ("The error was: " + decodeError s))
Notice Error<Async<_>>
`I get errors like below :
- Could not resolve the ambiguity inherent in the use of the operator 'Bind' at or near this program point. Consider using type annotations to resolve the ambiguity.
- Could not resolve the ambiguity inherent in the use of the operator 'LiftAsync' at or near this program point. Consider using type annotations to resolve the ambiguity.
- Type constraint mismatch when applying the default type 'obj' for a type inference variable. No overloads match for method 'LiftAsync'. The available overloads are shown below (or in the Error List window). Consider adding further type constraints
Why is that so ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with FSharpPlus/Samples/MonadTransformers.fsx and reproduce the behavior in Visual Studio 2015 with F# PowerTools. Compare the type-inference and syntax-colorization delays with and without the shown type annotation, then determine whether the cause belongs to the F# compiler, VisualFSharp, or FSharpPlus. Done means a confirmed diagnosis and a documented workaround or routing decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- compilers, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100