Advise-me-0.1: src/Recognize/Data/DiagnoseError.hs
-----------------------------------------------------------------------------
-- Copyright 2019, Advise-Me project team. This file is distributed under
-- the terms of the Apache License 2.0. For more information, see the files
-- "LICENSE.txt" and "NOTICE.txt", which are included in the distribution.
-----------------------------------------------------------------------------
-- |
-- Maintainer : bastiaan.heeren@ou.nl
-- Stability : provisional
-- Portability : portable (depends on ghc)
--
-----------------------------------------------------------------------------
module Recognize.Data.DiagnoseError where
import Ideas.Text.XML hiding (tag)
import Ideas.Text.HTML
import Ideas.Text.HTML.W3CSS
data DiagnoseError = Empty | Timeout | Unknown
deriving (Show, Eq)
instance ToXML DiagnoseError where
toXML Empty = makeXML "empty" mempty
toXML Timeout = makeXML "timeout" mempty
toXML Unknown = makeXML "unknown" mempty
instance ToHTML DiagnoseError where
toHTML = tag . background Red . string . ("DiagnoseError: " ++) . show