Use the newest requirements in lib to define an ID prefix for the Session type

This commit is contained in:
Tissevert 2019-11-20 18:26:23 +01:00
parent 7a937355d2
commit 0d19c4f8dc

View file

@ -9,12 +9,14 @@ module Session (
) where ) where
import Data.Text (Text) import Data.Text (Text)
import qualified Hanafuda.ID as Hanafuda (ID) import qualified Hanafuda.ID as Hanafuda (ID, IDType(..), Prefix(..))
import Hanafuda.KoiKoi (PlayerID) import Hanafuda.KoiKoi (PlayerID)
import Network.WebSockets (Connection) import Network.WebSockets (Connection)
import qualified Player (T(..)) import qualified Player (T(..))
type ID = Hanafuda.ID T type ID = Hanafuda.ID T
instance Hanafuda.IDType T where
prefix = Hanafuda.Prefix "Session"
type Status = Maybe Player.T type Status = Maybe Player.T
data T = T { data T = T {
connection :: Connection connection :: Connection