Skip to content
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

Fix warning-less and unnecessary orphans. #41

Open
bitemyapp opened this issue Mar 5, 2016 · 4 comments
Open

Fix warning-less and unnecessary orphans. #41

bitemyapp opened this issue Mar 5, 2016 · 4 comments

Comments

@bitemyapp
Copy link

Show instance for UTCTime doesn't appear unless you import Data.Thyme.Format / Data.Thyme.LocalTime.

@nuttycom
Copy link

nuttycom commented Mar 5, 2016

@bitemyapp thanks for reporting this. I ran into this last night when I was baffled by the fact that the Haddock included the Show instance for UTCTime, but ghc disagreed with its availability.

I think that in general, Show instances should only be used for debug messaging, and as you provide plenty of functions for doing proper rendering of UTCTime functions to strings, it would be very helpful if these instances were not orphaned; I really prefer if runtime behavior does change depending upon which modules are imported into a scope.

@liyang
Copy link
Member

liyang commented Mar 16, 2016

I'll look into this…

@ondrap
Copy link

ondrap commented May 27, 2016

This is how it is done in the time package. I'd also think it should go with the UTCTime instance, though there might be some arcane code depending on this behaviour (I guess the think shouldn't link anyway if some competing Show instance is defined?)

@LightAndLight
Copy link

I ran into the same issue with ToJSON/FromJSON. The orphan instances are in Data.Thyme.Format.Aeson, and importing Data.Thyme (UTCTime) doesn't bring them into scope. It was pretty confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants