Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[hints-w] A few type annotations for W.

  • Loading branch information...
commit 3a80167d99ae9e3677931125940861e73a4b0849 1 parent eb83e91
@fpessaux fpessaux authored Mathieu Barbin committed
View
2  multitub/multitub.opa
@@ -270,7 +270,7 @@ type Multitub.private.C.state('state) = {
~{ s_channel state } : Multitub.private.C.state
@client @private c_on_message(state, message) =
- map(internal_state) = { state with state = internal_state }
+ map(internal_state) = { state with state = internal_state } : Multitub.private.C.state
session_map_instruction(map, Multitub_C.on_message(state.s_channel, state.state, message))
/**
View
2  src/client_implementation.opa
@@ -85,7 +85,7 @@ type C.implementation.state = {
* Cf Multitub desig, the [s_channel] is used for sending messages to the server.
* The [message] can come from the server, or from some funactions.
**/
- on_message(s_channel : Multitub.S.channel, state : C.implementation.state, message : Multitub.C.message) =
+ on_message(s_channel : Multitub.S.channel, state : C.implementation.state, message : Multitub.C.message) : Session.instruction(C.implementation.state) =
match message with
| { jlog = message } ->
do ClientLayout.jlog(message)
View
2  src/game.opa
@@ -407,7 +407,7 @@ type Game.state = {
status = { in_progress = GameParameters.first_player } : Game.status
content = { free } : Game.content
grid = Grid.clear(game.grid, content)
- { game with ~grid ~status }
+ { game with ~grid ~status } : Game.state
/**
* Play an action in the game.
View
2  src/server_implementation.opa
@@ -126,7 +126,7 @@ type S.implementation.state = {
/**
* Handler
**/
- on_message(c_channel : Multitub.C.channel, state : S.implementation.state, message : Multitub.S.message) =
+ on_message(c_channel : Multitub.C.channel, state : S.implementation.state, message : Multitub.S.message) : Session.instruction(S.implementation.state) =
match message with
| { restart } ->
state = ServerUtils.new_game(c_channel, state)
Please sign in to comment.
Something went wrong with that request. Please try again.