mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-30 12:50:24 +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.Config
|
||||||
import Yesod.Default.Util (addStaticContentExternal)
|
import Yesod.Default.Util (addStaticContentExternal)
|
||||||
import Yesod.GitRepo
|
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
|
-- | The site argument for your application. This can be a good place to
|
||||||
-- keep settings and values requiring initialization before your application
|
-- keep settings and values requiring initialization before your application
|
||||||
@ -47,6 +49,12 @@ data App = App
|
|||||||
, websiteContent :: GitRepo WebsiteContent
|
, websiteContent :: GitRepo WebsiteContent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data SnapshotInfo = SnapshotInfo
|
||||||
|
{ siType :: !SnapshotType
|
||||||
|
, siPlan :: !BuildPlan
|
||||||
|
, siDocMap :: !DocMap
|
||||||
|
}
|
||||||
|
|
||||||
data DocUnpacker = DocUnpacker
|
data DocUnpacker = DocUnpacker
|
||||||
{ duRequestDocs :: Entity Stackage -> IO UnpackStatus
|
{ duRequestDocs :: Entity Stackage -> IO UnpackStatus
|
||||||
, duGetStatus :: IO Text
|
, duGetStatus :: IO Text
|
||||||
@ -158,6 +166,7 @@ instance Yesod App where
|
|||||||
|
|
||||||
maximumContentLength _ (Just UploadStackageR) = Just 50000000
|
maximumContentLength _ (Just UploadStackageR) = Just 50000000
|
||||||
maximumContentLength _ (Just UploadHaddockR{}) = Just 100000000
|
maximumContentLength _ (Just UploadHaddockR{}) = Just 100000000
|
||||||
|
maximumContentLength _ (Just UploadV2R) = Just 100000000
|
||||||
maximumContentLength _ _ = Just 2000000
|
maximumContentLength _ _ = Just 2000000
|
||||||
|
|
||||||
instance ToMarkup (Route App) where
|
instance ToMarkup (Route App) where
|
||||||
|
|||||||
@ -95,9 +95,9 @@ doUpload status uid ident bundleFP = do
|
|||||||
|
|
||||||
say $ "Unpacking bundle"
|
say $ "Unpacking bundle"
|
||||||
master <- getYesod
|
master <- getYesod
|
||||||
liftIO $ haddockUnpacker master True ident
|
-- FIXME liftIO $ haddockUnpacker master True ident
|
||||||
|
|
||||||
SnapshotInfo {..} <- getSnapshotInfoByIdent ident
|
SnapshotInfo {..} <- error "FIXME getSnapshotInfoByIdent ident"
|
||||||
|
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
let day = tshow $ utctDay now
|
let day = tshow $ utctDay now
|
||||||
@ -183,7 +183,6 @@ doUpload status uid ident bundleFP = do
|
|||||||
, stackageTitle = title
|
, stackageTitle = title
|
||||||
, stackageDesc = ""
|
, stackageDesc = ""
|
||||||
, stackageHasHaddocks = True
|
, stackageHasHaddocks = True
|
||||||
, stackageYaml = True
|
|
||||||
}
|
}
|
||||||
case siType of
|
case siType of
|
||||||
STNightly -> insert_ Nightly
|
STNightly -> insert_ Nightly
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user