-
Notifications
You must be signed in to change notification settings - Fork 815
ActivePatterns: Compilation issues (memory and speed) #18425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is somehow related to active-pattern usage: match
| A
| B
| C
| D
...
| Y
| Z when (something) -> ... // out of memory But if the when-conditions break the match often, (even with identical "something") then it works: match
| A when (something) -> ...
| B when (something) -> ...
| C when (something) -> ...
| D when (something) -> ...
| E when (something) -> ...
| F when (something) -> ...
...
| Z when (something) -> ... |
Bisecting tells me the issue (I assume it is an infinite loop, but could also be something too slow and I was not patient enough to see it finish) is within
function's body. |
There is definitely a missing reduction step to put those shared conditions together, which is also what might be slowing down the compilation's optimization phase. It correctly unifies the type check / type cast as far as I can see, but it still multiplities the |
I'm trying to compile a little simple F# file I made, using the latest released stable .NET.
Zip attached
ClassLibrary1.zip
Expected behaviour
Either compile or fail in a meaningful manner.
F# should be fast to compile a single file, right?
Actual behaviour
I have no idea what is going on.
Related information
Provide any related information (optional):
The text was updated successfully, but these errors were encountered: