mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +01:00
Make it compile
This commit is contained in:
parent
c6800fd7aa
commit
93f91708ca
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user