remove another sum type that was only needed to work around a bug in old yesod

And the bug is only a warning message at compile time..
This commit is contained in:
Joey Hess 2013-09-27 00:35:37 -04:00
parent 1f5611a1ca
commit 5bd5e604ad
4 changed files with 5 additions and 11 deletions

View file

@ -80,7 +80,7 @@ getNotifierBuddyListR = notifierUrl BuddyListR getBuddyListBroadcaster
getNotifierRepoListR :: RepoSelector -> Handler RepPlain getNotifierRepoListR :: RepoSelector -> Handler RepPlain
getNotifierRepoListR reposelector = notifierUrl route getRepoListBroadcaster getNotifierRepoListR reposelector = notifierUrl route getRepoListBroadcaster
where where
route nid = RepoListR $ RepoListNotificationId nid reposelector route nid = RepoListR nid reposelector
getTransferBroadcaster :: Assistant NotificationBroadcaster getTransferBroadcaster :: Assistant NotificationBroadcaster
getTransferBroadcaster = transferNotifier <$> getDaemonStatus getTransferBroadcaster = transferNotifier <$> getDaemonStatus

View file

@ -27,6 +27,7 @@ import Git.Config
import Git.Remote import Git.Remote
import Assistant.Sync import Assistant.Sync
import Config.Cost import Config.Cost
import Utility.NotificationBroadcaster
import qualified Git import qualified Git
#ifdef WITH_XMPP #ifdef WITH_XMPP
#endif #endif
@ -83,8 +84,8 @@ notWanted _ = False
- -
- Returns a div, which will be inserted into the calling page. - Returns a div, which will be inserted into the calling page.
-} -}
getRepoListR :: RepoListNotificationId -> Handler Html getRepoListR :: NotificationId -> RepoSelector -> Handler Html
getRepoListR (RepoListNotificationId nid reposelector) = do getRepoListR nid reposelector = do
waitNotifier getRepoListBroadcaster nid waitNotifier getRepoListBroadcaster nid
p <- widgetToPageContent $ repoListDisplay reposelector p <- widgetToPageContent $ repoListDisplay reposelector
giveUrlRenderer $ [hamlet|^{pageBody p}|] giveUrlRenderer $ [hamlet|^{pageBody p}|]

View file

@ -150,9 +150,6 @@ data RepoSelector = RepoSelector
} }
deriving (Read, Show, Eq) deriving (Read, Show, Eq)
data RepoListNotificationId = RepoListNotificationId NotificationId RepoSelector
deriving (Read, Show, Eq)
data RemovableDrive = RemovableDrive data RemovableDrive = RemovableDrive
{ diskFree :: Maybe Integer { diskFree :: Maybe Integer
, mountPoint :: Text , mountPoint :: Text
@ -207,10 +204,6 @@ instance PathPiece PairKey where
toPathPiece = pack . show toPathPiece = pack . show
fromPathPiece = readish . unpack fromPathPiece = readish . unpack
instance PathPiece RepoListNotificationId where
toPathPiece = pack . show
fromPathPiece = readish . unpack
instance PathPiece RepoSelector where instance PathPiece RepoSelector where
toPathPiece = pack . show toPathPiece = pack . show
fromPathPiece = readish . unpack fromPathPiece = readish . unpack

View file

@ -90,7 +90,7 @@
/buddylist/#NotificationId BuddyListR GET /buddylist/#NotificationId BuddyListR GET
/notifier/buddylist NotifierBuddyListR GET /notifier/buddylist NotifierBuddyListR GET
/repolist/#RepoListNotificationId RepoListR GET /repolist/#NotificationId/#RepoSelector RepoListR GET
/notifier/repolist/#RepoSelector NotifierRepoListR GET /notifier/repolist/#RepoSelector NotifierRepoListR GET
/alert/close/#AlertId CloseAlert GET /alert/close/#AlertId CloseAlert GET