hamler
hamler copied to clipboard
Records cannot work in REPL
-- 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