This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Teams and players *) | |
type team0 = Player0 | Player2 | |
type team1 = Player1 | Player3 | |
(* Tests *) | |
let a = Player0 | |
let is_player0 a = a == Player0 | |
let is_first_player_of_team a = a == Player0 || a == Player1 | |
(* Error: This variant expression is expected to have type team0 | |
* The constructor Player1 does not belong to type team0 | |
* Hint: Did you mean Player2 or Player0? *) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment