From 1d7a680d485ee806f3ac8dce8b1e7239a96d764b Mon Sep 17 00:00:00 2001 From: Sasha Date: Thu, 12 Apr 2018 23:05:58 +0200 Subject: [PATCH] Remove unused Player.T type --- src/Player.hs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/Player.hs b/src/Player.hs index a0af7e5..c39988a 100644 --- a/src/Player.hs +++ b/src/Player.hs @@ -6,8 +6,6 @@ module Player ( , Name , Session(..) , Status(..) - , T(..) - , new , openSession ) where @@ -22,18 +20,6 @@ import GHC.Generics newtype Key = Key Int deriving (Eq, Ord, Read, Show, Generic) newtype Name = Name Text deriving (Eq, Ord, Generic) -data T = T { - key :: Key - , name :: Name - } - deriving (Generic) - -instance Data.RW Key T where - update f player@(T {key}) = player {key = f key} - -instance Data.RW Name T where - update f player@(T {name}) = player {name = f name} - instance FromJSON Key instance ToJSON Key where toEncoding = genericToEncoding JSON.defaultOptions @@ -45,9 +31,6 @@ instance FromJSON Name instance ToJSON Name where toEncoding = genericToEncoding JSON.defaultOptions -instance ToJSON T where - toEncoding = genericToEncoding JSON.defaultOptions - data Status = LoggedIn Bool | Answering Key @@ -62,9 +45,6 @@ data Session = Session { instance Data.RW Status Session where update f session@(Session {status}) = session {status = f status} -new :: Key -> Name -> T -new key name = T {key, name} - openSession :: Connection -> Session openSession connection = Session { connection