Skip to content

Feature Request: Expose split tactic #21

Open
haskell/haskell-language-server
#1461
@ProofOfKeags

Description

@ProofOfKeags
data A = ...
data B = ...
data C = ...

thing :: (A, B) -> C
thing = ...

expCurrentlyUnderImplementation :: C
expCurrentlyUnderImplementation = 
    let baz = case foo of
        Bar a -> _
    in thing baz

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions