haskell / time

A time library
http://hackage.haskell.org/package/time
Other
118 stars 78 forks source link

Month of year type attempt 2 #247

Closed NorfairKing closed 9 months ago

NorfairKing commented 9 months ago

Another attempt (after #246) at solving #134 as proposed in https://github.com/haskell/time/pull/246#issuecomment-1790657578

jappeace commented 9 months ago

what's the point of adding this to the library if it's not used anywhere? :sweat_smile:

AshleyYakeley commented 9 months ago

Instead of modifying the time library, you could just put this in your code: import Data.Time hiding (MonthOfYear, January, February, March, April, May, June, July, August, September, October, November, December)

AshleyYakeley commented 9 months ago

This PR removes the existing MonthOfYear type synonym and replaces it with a MonthOfYear type which is not actually used anywhere in the library. It's also surprising to the user, as it breaks the pattern of the other synonyms, DayOfMonth, DayOfYear, WeekOfYear, as well as violating the rule of having only one type per concept (since Int is still used for month-of-year in all functions).

I'm really not sure why you think this PR is an improvement to the time library?