fix build with shakespeare-js-1.0.0.2

For no apparent reason, this version removes all useful instances of
ToJavaScript, leavind behind only an instance for Aeson.Value. Argh. Pissed
off at this arbitrary breaking change, and seriously considering dropping
this library.
This commit is contained in:
Joey Hess 2012-11-18 13:00:35 -04:00
parent 77888a6c1b
commit fe11b3a940
2 changed files with 13 additions and 5 deletions

View file

@ -20,6 +20,7 @@ import Utility.Yesod
import Yesod
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Aeson.Types as Aeson
{- Add to any widget to make it auto-update using long polling.
-
@ -32,9 +33,16 @@ import qualified Data.Text as T
- ms_startdelay is how long to delay before updating with AJAX at the start
-}
autoUpdate :: Text -> Route WebApp -> Int -> Int -> Widget
autoUpdate ident geturl ms_delay ms_startdelay = do
let delay = T.pack (show ms_delay)
let startdelay = T.pack (show ms_startdelay)
autoUpdate tident geturl ms_delay ms_startdelay = do
#ifdef WITH_OLD_YESOD
let delay = show ms_delay
let startdelay = show ms_startdelay
let ident = tident
#else
let delay = Aeson.String (T.pack (show ms_delay))
let startdelay = Aeson.String (T.pack (show ms_startdelay))
let ident = Aeson.String tident
#endif
addScript $ StaticR longpolling_js
$(widgetFile "notifications/longpolling")

View file

@ -1,5 +1,5 @@
Name: git-annex
Version: 3.20121112
Version: 3.20121113
Cabal-Version: >= 1.8
License: GPL
Maintainer: Joey Hess <joey@kitenet.net>
@ -95,7 +95,7 @@ Executable git-annex
if flag(Webapp) && flag(Assistant)
Build-Depends: yesod, yesod-static, case-insensitive,
http-types, transformers, wai, wai-logger, warp, blaze-builder,
crypto-api, hamlet, clientsession,
crypto-api, hamlet, clientsession, aeson,
template-haskell, yesod-default (>= 1.1.0), data-default
CPP-Options: -DWITH_WEBAPP