mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-13 00:16:19 +03:00
document potentially-surprising Month <-> Enum (#8923)
Based on a [forum question] by Alxander Bernauer. [forum question]: https://discuss.daml.com/t/enum-instance-for-month-is-misleading/2098?u=gary_verhaegen CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
e080b81f0b
commit
1b56b31e80
@ -17,6 +17,9 @@ data DayOfWeek
|
||||
| Sunday
|
||||
|
||||
-- | The `Month` type represents a month in the Gregorian calendar.
|
||||
--
|
||||
-- Note that, while `Month` has an `Enum` instance, the `toEnum` and `fromEnum`
|
||||
-- functions start counting at 0, i.e. `toEnum 1 :: Month` is `Feb`.
|
||||
data Month
|
||||
= Jan
|
||||
| Feb
|
||||
|
Loading…
Reference in New Issue
Block a user