hamler icon indicating copy to clipboard operation
hamler copied to clipboard

Records cannot work in REPL

Open emqplus opened this issue 4 years ago • 0 comments

-- declare a Person record
data Person = Person {name :: String, age :: Integer}

p = Person {name = "John", age = 12}

-- update a Person record
p1 = p {name = "Miles", age = 20}

--  getters
name = p1.name :: String
age = p1.age   :: Integer

emqplus avatar Jun 17 '20 06:06 emqplus