Closed mwalkerwells closed 5 years ago
A value can be a member of multiple types. 0
, for example, is a member of the following types:
These types are listed on a single line in error messages, separated by commas. For example:
S.toUpper (0);
// ! TypeError: Invalid value
//
// toUpper :: String -> String
// ^^^^^^
// 1
//
// 1) 0 :: Number, FiniteNumber, Integer, NonNegativeInteger, ValidNumber
//
// The value at position 1 is not a member of ‘String’.
//
// See https://github.com/sanctuary-js/sanctuary-def/tree/v0.18.1#String for information about the String type.
Ah, makes sense! Thank you!
What does the comma mean? Union?