When trying various compression tools, display some messages
to the user about which compression tool is used.
--HG--
extra : rebase_source : e90e6ed49317b91a0fbe90d94f437459926f59e7
In the future we might want to add new features to the
Entry. I am currently thinking about source maps, where
a new field will need to be added to the Entry. Therefore,
use Data.Default to make sure we don't need to bump the
major version for these features.
There were two build issues on GHC 7.4: using atomicModifyIORef'
and ByteString.Lazy.toStrict, both of which were missing. These
are now fixed.
In addition, looking at the IORef code more closely,
we want the quite a bit of strictness in the IORef.
The common case is that the widget content already exists in the map
(every reload of a page will call embedStaticContent), but until we
force the map the thunks holding the duplicated generated content will
be kept around, leaking memory. This will be the common situation since
the vast majority of the time the content already exists. Since
the containers module does not have a strict map until 0.5, use
unordered containers which does have a strict map.
This commit adds just the subsite itself. The subsite
works by running a list of generaters at compile time.
The entries produced by the generators are converted into
wai-app-static.WaiAppStatic.Storage.Embedded entries. Also,
addStaticContent is supported via an IORef. When a widget
produces static content (css, javascript), it is stuck into
the IORef inside the embedded static subsite. The embedded
static subsite will then serve it from the IORef, properly
using a 304 response if the client already has the content.