allow player creation callbacks to be impure
This commit is contained in:
@@ -217,9 +217,9 @@ data CreatePlayerState = CreatePlayerState
|
||||
-- ^ The player's name
|
||||
, _cpsPosition :: String
|
||||
-- ^ The player's position
|
||||
, _cpsSuccessCallback :: ProgState -> ProgState
|
||||
, _cpsSuccessCallback :: Action ()
|
||||
-- ^ The function to call on success
|
||||
, _cpsFailureCallback :: ProgState -> ProgState
|
||||
, _cpsFailureCallback :: Action ()
|
||||
-- ^ The function to call on failure
|
||||
}
|
||||
|
||||
@@ -495,8 +495,8 @@ newCreatePlayerState = CreatePlayerState
|
||||
{ _cpsNumber = Nothing
|
||||
, _cpsName = ""
|
||||
, _cpsPosition = ""
|
||||
, _cpsSuccessCallback = id
|
||||
, _cpsFailureCallback = id
|
||||
, _cpsSuccessCallback = return ()
|
||||
, _cpsFailureCallback = return ()
|
||||
}
|
||||
|
||||
-- | Constructor for a 'Database'
|
||||
|
||||
Reference in New Issue
Block a user