Make it compile

This commit is contained in:
Michael Snoyman 2015-03-16 11:40:44 +02:00
parent c6800fd7aa
commit 93f91708ca
2 changed files with 11 additions and 3 deletions

View File

@ -23,6 +23,8 @@ import Yesod.Core.Types (Logger, GWData)
import Yesod.Default.Config
import Yesod.Default.Util (addStaticContentExternal)
import Yesod.GitRepo
import Stackage.ServerBundle (SnapshotType, DocMap)
import Stackage.BuildPlan (BuildPlan)
-- | The site argument for your application. This can be a good place to
-- keep settings and values requiring initialization before your application
@ -47,6 +49,12 @@ data App = App
, websiteContent :: GitRepo WebsiteContent
}
data SnapshotInfo = SnapshotInfo
{ siType :: !SnapshotType
, siPlan :: !BuildPlan
, siDocMap :: !DocMap
}
data DocUnpacker = DocUnpacker
{ duRequestDocs :: Entity Stackage -> IO UnpackStatus
, duGetStatus :: IO Text
@ -158,6 +166,7 @@ instance Yesod App where
maximumContentLength _ (Just UploadStackageR) = Just 50000000
maximumContentLength _ (Just UploadHaddockR{}) = Just 100000000
maximumContentLength _ (Just UploadV2R) = Just 100000000
maximumContentLength _ _ = Just 2000000
instance ToMarkup (Route App) where

View File

@ -95,9 +95,9 @@ doUpload status uid ident bundleFP = do
say $ "Unpacking bundle"
master <- getYesod
liftIO $ haddockUnpacker master True ident
-- FIXME liftIO $ haddockUnpacker master True ident
SnapshotInfo {..} <- getSnapshotInfoByIdent ident
SnapshotInfo {..} <- error "FIXME getSnapshotInfoByIdent ident"
now <- liftIO getCurrentTime
let day = tshow $ utctDay now
@ -183,7 +183,6 @@ doUpload status uid ident bundleFP = do
, stackageTitle = title
, stackageDesc = ""
, stackageHasHaddocks = True
, stackageYaml = True
}
case siType of
STNightly -> insert_ Nightly