{-# LANGUAGE RecordWildCards, ViewPatterns #-} -- | Define a continuous integration system. module Development.Bake.Server.Web( web ) where import Development.Bake.Server.Type import Development.Bake.Type import Development.Bake.Web import Development.Bake.Util import Development.Bake.Format import Data.List.Extra import Data.Tuple.Extra import Data.Version import Paths_bake web :: Oven State Patch Test -> [(String, String)] -> Server -> IO Output web oven@Oven{..} args server = do shower <- shower oven return $ OutputHTML $ unlines $ prefix ++ (if null args then ["
"] ++ lines aStdout ++ [""] _ -> []) where good = filter (pred . snd3) history showQuestion q@Question{..} = "With " ++ showState (fst qCandidate) ++ (if null $ snd qCandidate then "" else " plus ") ++ commas (map showPatch $ snd qCandidate) ++ "