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:
Gary Verhaegen 2021-02-25 10:33:52 +01:00 committed by GitHub
parent e080b81f0b
commit 1b56b31e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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