Type-Safe Tic-tac-toe
I recently had occasion to screw around Haskell's type system. The end goal was to produce a Tic-tac-toe game in which all type-correct moves are legal and where all illegal moves produce type errors. I decided call the following moves illegal attempts to move on a cell already occupied attempts to make a move on [...]