Closed andrew-barnard closed 2 years ago
Whilst following the documentation at https://github.com/purescript/documentation/blob/master/language/Differences-from-Haskell.md#records, I receive the error Could not match type Int with type Number.
Could not match type Int with type Number
The type PointRec is defined as type PointRec = { x :: Number, y :: Number }.
type PointRec = { x :: Number, y :: Number }.
Yet the example usage is
origin :: PointRec origin = { x: 0, y: 0 }
resulting in the type mismatch.
Suggest perhaps origin = { x: 0.0 , y: 0.0} ?
origin = { x: 0.0 , y: 0.0}
Yeah, that's need to be fixed and your suggestion is correct.
Closed by #445
Whilst following the documentation at https://github.com/purescript/documentation/blob/master/language/Differences-from-Haskell.md#records, I receive the error
Could not match type Int with type Number
.The type PointRec is defined as
type PointRec = { x :: Number, y :: Number }.
Yet the example usage is
resulting in the type mismatch.
Suggest perhaps
origin = { x: 0.0 , y: 0.0}
?