Total Pageviews

Monday, 15 August 2016


This repository contains my attempt to create site using Haskell and Snap framework.
I'm novice to Haskell so use code at your own risk.


  1. Haskell Platform I'm using 2012.1.0.0 from Ubuntu 12.04 repositoty.
  2. Node.js and less compiler
  3. Closure linter
  4. Java and Python for Google Closure Compiler.
  5. MySQL database


To build project you need these steps:
  1. Checkout repository
  2. Import schema from schema.sql into your database
  3. Configure database access in src/Config.hs
  4. Setup cabal if you didn't do that earlier: cabal update and cabal install cabal-install
  5. Install project dependencies cabal install --only-dependencies. This step may require installation of dev-versions of some libraries (libcurl4-dev, etc.). For Ubuntu you can use this command: sudo apt-get install libcurl4-openssl-dev libmysqlclient-dev.
  6. In project root run cabal configure and cabal build
  7. The build all required js and css files by running ./
  8. Create empty file config/site_key.txttouch config/site_key.txt
  9. Start server dist/build/haskell-blog/haskell-blog
That's all.
In development mode Snap framework dynamically rebuild source so all you have to do is refresh page in browser. And Google Closure Library doesn't require building in development mode. Using uncompressed less files is not yet supported. You have to rebuild them manually by running ./build_styles.js
Please let me know if I've missed something.


  1. Checkout production branch.
  2. Comment out rcp command in ./
  3. Configure variables (see below)
  4. Run ./
You'll find haskell-blog.tar.lzma in project root. It will contain all required files for running project.


There is src/Config.hs which contains configuration of your environment.
  1. adminLoginadminPassword --- credentials for accessing vault.
  2. rackspaceAuthKeyrackspaceAuthUser --- you don't plan to use Rackspace CloudFiles you can skip it
  3. disqusApiKey --- disqus key for syncing comments.