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

Cannot create record with '=' in REPL #189

Open
emqplus opened this issue Jun 17, 2020 · 1 comment
Open

Cannot create record with '=' in REPL #189

emqplus opened this issue Jun 17, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@emqplus
Copy link
Contributor

emqplus commented Jun 17, 2020

> data Person = Person {name :: String, age :: Integer}
> p = Person {name = "John", age = 12}
Error found:
in module $PSCI
at :1:5 - 1:37 (line 1, column 5 - line 1, column 37)

  Could not match type

    Record

  with type

    Function
      { age :: Integer
      , name :: List Char
      }


while trying to match type { age :: t1
                           , name :: t0
                           | t2
                           }
  with type { age :: Integer
            , name :: List Char
            }
            -> Person
while checking that expression $0
  has type { age :: t1
           , name :: t0
           | t2
           }
in value declaration p

where t2 is an unknown type
      t0 is an unknown type
      t1 is an unknown type
@emqplus emqplus added the bug Something isn't working label Jun 17, 2020
@emqplus emqplus added this to the 0.1.2 milestone Jun 17, 2020
@prescientmoon
Copy link

Record literals use :, not =

@emqplus emqplus modified the milestones: 0.1.2, 0.2 - OTP Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants