Created
December 18, 2014 18:10
-
-
Save mrmurphy/935633f8ced0fa3b680a 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 User = User { | |
id :: String, | |
email :: String, | |
hash :: String, | |
institutionId :: String | |
} deriving (Show, Generic) | |
instance ToJSON User | |
instance FromJSON User | |
instance ToDatum User | |
instance FromDatum User | |
instance Expr User | |
data UserPrintable = UserPrintable { | |
email :: String, | |
id :: String, | |
institutionId :: String | |
} deriving (Generic) | |
instance ToJSON UserPrintable | |
instance FromJSON UserPrintable | |
instance ToDatum UserPrintable | |
instance FromDatum UserPrintable | |
data UserCreatable = UserCreatable { | |
email :: String, | |
hash :: String, | |
institutionId :: String | |
} deriving (Generic) | |
instance ToJSON UserCreatable | |
instance FromJSON UserCreatable | |
instance ToDatum UserCreatable | |
instance FromDatum UserCreatable | |
instance Expr UserCreatable | |
data UserFromRequest = UserFromRequest { | |
email :: String, | |
institutionId :: String, | |
password :: String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment