<div>Hey there, <br></div><div><br></div><div>I am writing a simple game and the only missing part is IO (Sadly, i need that to play). <br></div><div class="protonmail_signature_block protonmail_signature_block-empty"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><br></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><div>I've got most things pure, e.g. makeMove :: GameState -> Move -> GameState, initialBoard:: GameState and lost :: GameState -> Bool work pure and as intended. <br></div><div>I also got a function gameLoop :: GameState -> IO GameState which asks for Input and applies it.<br></div><div> <br></div><div>I don`t know how to do my main :: IO () <br></div><div>which should welcome the player, start the gameloop, and print godbyes the game if it's either won or lost <br></div><div>Here i am missing a control structure, to demonstrate:<br></div><div><br></div><div>show hello<br></div><div>board = initialBoard <br></div><div>while (not end board)<br></div><div>    board = gameLoop board<br></div><div>show winner<br></div><div><br></div><div>I could also make my Gameloop recursive, while i think that i get this working, it seems awfully complex (and ugly) to me. <br></div><div><br></div><div>Best regards<br></div><div>Leonhard<br></div>