-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
e8cd500
to
7790be9
Compare
7790be9
to
7d7a778
Compare
7d7a778
to
835b5cf
Compare
This change needs a bit more work, as I found some more complex examples of refinement hole fits are not handled by the new regex approach |
b415635
to
38f3afb
Compare
2ffa9cf
to
53a5d9a
Compare
My second pass is ready for re-review:
|
Refinement hole fits are very cool, but currently too slow to enable at deeper levels. It should eventually be user configurable.
eb065a0
to
0a3f501
Compare
/azp run |
No pipelines are associated with this pull request. |
bff6195
to
4edf523
Compare
85e4a0a
to
03f02df
Compare
Is this OK to merge? |
Yes, good to merge if changes requested after re-review |
@@ -94,6 +94,9 @@ data IdeOptions = IdeOptions | |||
-- Otherwise, return the result of parsing without Opt_Haddock, so | |||
-- that the parsed module contains the result of Opt_KeepRawTokenStream, | |||
-- which might be necessary for hlint. | |||
, optCustomDynFlags :: DynFlags -> DynFlags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this for hls and other downstream users of ghcide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
$ flip gopt_unset Opt_ShowTypeAppOfHoleFits -- not used | ||
$ flip gopt_unset Opt_ShowTypeAppVarsOfHoleFits -- not used | ||
$ flip gopt_unset Opt_ShowTypeOfHoleFits -- massively simplifies parsing | ||
$ flip gopt_set Opt_SortBySubsumHoleFits -- very nice and fast enough in most cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line slows the whole thing by a lot, since it does pairwise comparison between every single possible fit, and everything grinds to a halt. I'd strongly recommend you turn it off!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean sort by subsumption right? It wasn't too bad in my empirical tests. It's quadratic complexity but the number of items is small, so only in degenerate cases like _ :: a
does it grind to a halt, and ghcide will cancel it as soon as an edit is made anyway.
Overall, there is no set of flags that will make everyone happy, so we should eventually expose this flags as a user configurable setting.
* Refinement holes * Set more GHC options and use indentation for parsing * Add an option to customize the typed holes settings Refinement hole fits are very cool, but currently too slow to enable at deeper levels. It should eventually be user configurable. * GHC Compatibility * Compat. with 8.4
* Refinement holes * Set more GHC options and use indentation for parsing * Add an option to customize the typed holes settings Refinement hole fits are very cool, but currently too slow to enable at deeper levels. It should eventually be user configurable. * GHC Compatibility * Compat. with 8.4
* Refinement holes * Set more GHC options and use indentation for parsing * Add an option to customize the typed holes settings Refinement hole fits are very cool, but currently too slow to enable at deeper levels. It should eventually be user configurable. * GHC Compatibility * Compat. with 8.4
Fixes #639