3 | module Language.LSP.Severity
17 | data Severity = Debug | Info | Warning | Error | Critical
20 | parseSeverity : String -> Maybe Severity
21 | parseSeverity str = case toUpper str of
22 | "DEBUG" => Just Debug
24 | "WARNING" => Just Warning
25 | "ERROR" => Just Error
26 | "CRITICAL" => Just Critical
29 | Cast Severity Integer where
38 | Debug == Debug = True
40 | Warning == Warning = True
41 | Error == Error = True
42 | Critical == Critical = True
47 | show Debug = "DEBUG"
49 | show Warning = "WARNING"
50 | show Error = "ERROR"
51 | show Critical = "CRITICAL"
55 | compare x y = compare (cast {to = Integer} x) (cast y)