Skip to content

Wingman introduces lambda that breaks record syntax #1820

Closed
@berberman

Description

@berberman

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 1.1.0.0 (GHC: 8.10.4) (PATH: /home/berberman/.cabal/store/ghc-8.10.4/haskell-language-server-1.1.0.0-e-haskell-language-server-8692a1045014e5bb8782775bcacff5aed7411f5757beba45db9816de76f71533/bin/haskell-language-server)
Tool versions found on the $PATH
cabal:          3.4.0.0
stack:          Not found
ghc:            8.10.4

Which OS do you use:

NixOS
Which lsp-client do you use:

VS Code

Steps to reproduce

data Pair a b = Pair {pa :: a, pb :: b}

p :: Pair (a -> a) (a -> b -> c -> b)
p = Pair {pa = _, pb = _}

Run "Wingman: attempt to fill hole" on holes

Expected behaviour

data Pair a b = Pair {pa :: a, pb :: b}

p :: Pair (a -> a) (a -> b -> c -> b)
p = Pair {pa = id, pb = \a b c -> b}

Actual behaviour

data Pair a b = Pair {pa :: a, pb :: b}

p :: Pair (a -> a) (a -> b -> c -> b)
p = Pair {pa =id, pb =\ a b c -> b}

The lambda backslash is connected to the equals sign of record syntax, resulting in a parse error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: wingmantype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions