Skip to content
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

Vertical bar error message wrong #330

Open
adhedgehog opened this issue Feb 22, 2020 · 0 comments
Open

Vertical bar error message wrong #330

adhedgehog opened this issue Feb 22, 2020 · 0 comments

Comments

@adhedgehog
Copy link

Code:

nameChange : String -> { name : String, age : Int } -> { name : String, age : Int }
nameChange newName person =
     person | name = newName 

Error message:

-- UNEXPECTED SYMBOL ---- 

I was not expecting this vertical bar:

116|      person | name = newName 
                 ^
Vertical bars should only appear in custom type declarations. Maybe you want || instead?

This custom type suggestion is misleading because in this case I'm trying to update a record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant