-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature Request: Expose split tactic #21
Feature Request: Expose split tactic #21
Comments
PR welcome. Implementation sketch:
Shouldn't take more than half an hour to get everything up and running. |
I've worked a bit to make the Let me know what you think. @isovector I suppose part of the implementation could be replaced by using
I'm not so sure about compatibility. |
Great to see that you're diving in, @WorldSEnder. Do you have further plans for these dependently typed things? As it stands I'm not convinced the machinery is worth the cost. Type-level stuff works best to prevent dangerous and silent issues, but right now the worst that can happen is we use an Furthermore, as I understand LSP, our interface is extremely limited and it's unlikely we'll ever push more information into |
Not further than that, I'm not fully convinced either. Having to add a TacticCommand in 11 places instead of 5 is overhead, definitely. I will ponder the question the next few days while I'm on vacation. |
I think I'd like to understand the purpose of the type machinery added. Looking at the commit referenced, I'm not quite sure exactly what it is doing. That said, one of the things I've used it for is basically hacking GHC's constraint solver to solve arbitrary constraints in the programmer's code. |
@ProofOfKeags currently some
|
One code action per datatype constructor is produced.
One code action per datatype constructor is produced.
One code action per datatype constructor is produced.
…atype constructor is produced.test cases for splittingdon't suggest constructors with hash by defaultsuggesting I# for Int probably is not what you want99% of the timealso reuse tyDataCons, tacnameuse 'algebraicTyCon' as filter for now
…atype constructor is produced.test cases for splittingdon't suggest constructors with hash by defaultsuggesting I# for Int probably is not what you want99% of the timealso reuse tyDataCons, tacnameuse 'algebraicTyCon' as filter for now
One code action per datatype constructor is produced. test cases for splitting don't suggest constructors with hash by default suggesting I# for Int probably is not what you want 99% of the time also reuse tyDataCons, tacname use 'algebraicTyCon' as filter for now
One code action per datatype constructor is produced. test cases for splitting don't suggest constructors with hash by default suggesting I# for Int probably is not what you want 99% of the time also reuse tyDataCons, tacname use 'algebraicTyCon' as filter for now
Consider the above scenario. I'd like to have a code action that fills the hole with (_, _). Conceptually this is working backwards from the result rather than case splitting which is working forward from the arguments. Perhaps this should only kick in if the desired result has a single top level constructor.
If baz' type infer's to HLS'
Any
type, then no code action would be suggested.The text was updated successfully, but these errors were encountered: