Skip to content

Wingman introduces lambda that breaks record syntax #1820

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

Closed
berberman opened this issue May 11, 2021 · 0 comments · Fixed by #1851
Closed

Wingman introduces lambda that breaks record syntax #1820

berberman opened this issue May 11, 2021 · 0 comments · Fixed by #1851
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@berberman
Copy link
Collaborator

berberman commented May 11, 2021

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.

@Ailrun Ailrun added component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants