The Snap team is happy to announce the release of version 0.9 of the Snap Framework.

New features

  • The snaplet infrastructure now has support for user-specified execution environments. This allows you to switch between different config file sets with a -e option on the command line. The default environment is “devel”, which means that each snaplet will look in “devel.cfg” for config data. So if you have existing snaplets with config files, you will have to rename them.

  • Janne Hellsten contributed a new “snap init” project template that demonstrates use of the session and auth snaplets.

  • The code for our development mode dynamic reloader has been split out into two separate packages snap-loader-dynamic and snap-loader-static. This has several positive effects. First, it allows you to use the reloader without all the dependencies required by the snap package. Second, you no longer have to build with cabal install snap -fhint to allow reloading. Development mode is always available in an application generated by “snap init” simply by building it with “-fdevelopment”.

  • Removed the aging libev backend from snap-server.

  • Added a startupHook functions that allow you to get socket data for the running server.

Bugfixes / minor improvements

  • We have converted a number of internal data structures to use Data.HashMap.Strict instead of Data.Map. In the case where these maps are visible in the external API, this is a breaking change. The modules Snap.Util.FileServe.{MimeMap, HandlerMap} are among those affected.

  • Export overlooked functions for getting and setting maximumNumberOfFormInputs in Snap.Util.FileUploads.

  • Added application/json as a compressible mime type.

  • Added support for the HTTP PATCH method and arbitrary user-defined extension methods.

  • Fixed a bug in setHeader causing it to have no effect.

  • Added a workaround for a problem where GHC 7.4 on Windows complained about a missing RecordWildCards extension.

  • Fixed a bug in loginUser that caused it to always return success.

  • Fixed a bug in Heist’s getXMLDoc function to use XML instead of HTML parsing.


  • Increased blaze-html upper bound to include 0.5.*
  • Increased MonadCatchIO-transformers upper bound to include 0.3.*
  • Increased mtl upper bound to include 2.1.*
  • Increased xmlhtml upper bound to include 0.2.*