-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SecondOfDay and MinuteOfDay types #243
Comments
Hmm, could be useful. Leaving aside the principle of not representing disallowed state, the more practical advantage of these types over |
@AshleyYakeley I know we differ in opinion about this, so I won't argue about it. What caused the issue with persistent/sqlite is that persistent/sqlite doesn't represent sub-second precision but |
OK, but what actually happened that caused the problem? |
@AshleyYakeley I'm not sure. I'm guessing an upgrade somewhere but I can't tell of which package: |
OK. Well let's leave this open, see if anyone has a real-world use-case for it. |
@AshleyYakeley I've already had a real-world use-case in https://social-dance.today. |
Can you tell me why it's not round-tripping? |
Which way are you going, sqlite→ |
@AshleyYakeley it's the latter. |
I think this is better left for another package to do. It would introduce a lot of additional conversion functions, and generally I want to keep |
* Allow base-4.17 for GHC 9.4; restrict filepath < 1.5 * Fix 'marked as Trustworthy but has been inferred as safe' warning
I'm running into this bug: yesodweb/persistent#1500 and I realise that actually I don't need sub-second or even sub-minute precision.
Perhaps
time
could haveSecondOfDay
andMinuteOfDay
types that avoid this problem by construction.The text was updated successfully, but these errors were encountered: