Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (37 sloc) 2.4 KB



An implementation of Five in a Row game done in Haskell and Yesod with Server-sent Events.


It is based on a previous project of mine, takefive, which is a minimal Five in a Row implementation. If you're new to Haskell and would like to see sample code, inspect takefive’s source code.

Tfoo is an attempt to create simple, modern and useful Haskell web application. It doesn't require any database setup (because it doesn't use database) and its deployment is relatively easy (see: Deploying Tfoo and other Haskell applications to Heroku ). Some people say that it is also an enjoyable game.

Helpful links

Project structure

Tfoo/*.hs          : Most basic, non-IO data and functions.
Tfoo/Handlers/*.hs : Only topmost Handler functions.
Tfoo/Helpers/*.hs  : IO functions built on top of Tfoo/*.hs code; these
                     helper functions are used in Handlers.
Main.hs            : Main entry point.


The project lacks Cabal file. I'll add one in my free time (pull requests welcome too!). Below, for quick reference, a list of all dependencies.

wai-eventsource (
yesod (0.10.2)
yesod-static (0.10.1)
yesod-default (0.6.1)
blaze-builder (
shakespeare-js (0.11.2)
shakespeare-css (0.10.8)
hamlet (


(pull requests welcome)

  • Add cabal file.

  • Improve AI (make it faster; implement minimax).

  • Create a mobile view.

  • Create a (public) dashboard that would show current games (real-time).

  • There is a bug that causes Server-sent Events not being propagated after ~3 minutes of client (Safari browser) waiting. Investigate and fix.


MIT, see LICENSE file for details.