Last active
April 24, 2019 17:58
-
-
Save crappygraphix/193378fb7764032b2abcd26a584aa593 to your computer and use it in GitHub Desktop.
Instance of Show causing infinite loops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Potential infinite loop | |
instance Show VersionStatus where | |
show PrivatePreview = "Private Preview" | |
show PublicPreview = "Public Preview" | |
show x = show x | |
-- Not an infinite loop | |
instance Show VersionStatus where | |
show PrivatePreview = "Private Preview" | |
show PublicPreview = "Public Preview" | |
show x = show $ toConstr x | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment