diff options
author | Joris | 2016-03-23 00:45:33 +0100 |
---|---|---|
committer | Joris | 2016-03-23 00:46:53 +0100 |
commit | a11ad41b52ed3682d33382f2a378bf3294d688b2 (patch) | |
tree | f1d0f7835965ebcc6a61225186cad6b5de565bca /src/server/Model/Message | |
parent | 32db6a74d8578f993dd1cce3367fc7615ec730cd (diff) |
Sign in token link to /
Diffstat (limited to 'src/server/Model/Message')
-rw-r--r-- | src/server/Model/Message/Key.hs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/Model/Message/Key.hs b/src/server/Model/Message/Key.hs index 4c0287b..b883132 100644 --- a/src/server/Model/Message/Key.hs +++ b/src/server/Model/Message/Key.hs @@ -1,7 +1,13 @@ +{-# LANGUAGE DeriveGeneric #-} + module Model.Message.Key ( Key(..) ) where +import GHC.Generics + +import Data.Aeson + data Key = -- Title @@ -77,4 +83,10 @@ data Key = | NetworkError | UnexpectedPayload - deriving (Enum, Bounded, Show) + deriving (Enum, Bounded, Show, Generic) + +instance ToJSON Key + +-- instance ToJSON Coord where +-- toJSON (Coord x y) = object ["x" .= x, "y" .= y] +-- toEncoding (Coord x y) = pairs ("x" .= x <> "y" .= y) |