Created
January 23, 2016 14:42
-
-
Save codedmart/a583e6664043f44072ba to your computer and use it in GitHub Desktop.
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
data ConditionValues a b c = I a | T b | S c | |
deriving (Eq, Ord, Read, Show) | |
instance (ToJSON a, ToJSON b, ToJSON c) => ToJSON (ConditionValues a b c) where | |
toJSON (I a) = toJSON a | |
toJSON (T b) = toJSON b | |
toJSON (S b) = toJSON b | |
instance (FromJSON a, FromJSON b, FromJSON c) => FromJSON (ConditionValues a b c) where | |
-- parseJSON f = I <$> parseJSON f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment