0 | module Protocol.IDE.Decoration
7 | data Decoration : Type where
10 | Function : Decoration
12 | Keyword : Decoration
14 | Namespace : Decoration
15 | Postulate : Decoration
20 | Comment == Comment = True
22 | Function == Function = True
24 | Keyword == Keyword = True
25 | Bound == Bound = True
26 | Namespace == Namespace = True
27 | Postulate == Postulate = True
28 | Module == Module = True
32 | Show Decoration where
33 | show Comment = "comment"
35 | show Function = "function"
37 | show Keyword = "keyword"
38 | show Bound = "bound"
39 | show Namespace = "namespace"
40 | show Postulate = "postulate"
41 | show Module = "module"
45 | SExpable Decoration where
46 | toSExp decor = SExpList [ SymbolAtom "decor"
47 | , SymbolAtom (show decor)
53 | display : Decoration -> String
54 | display Comment = "comment"
55 | display Typ = "type"
56 | display Function = "function"
57 | display Data = "data"
58 | display Keyword = "keyword"
59 | display Bound = "bound"
60 | display Namespace = "namespace"
61 | display Postulate = "postulate"
62 | display Module = "module"
65 | FromSExpable Decoration where
66 | fromSExp (SExpList [SymbolAtom "decor", SymbolAtom decor]) =
68 | "comment" => Just Comment
70 | "function" => Just Function
72 | "keyword" => Just Keyword
73 | "bound" => Just Bound
74 | "namespace" => Just Namespace
75 | "postulate" => Just Postulate
76 | "module" => Just Module
78 | fromSExp _ = Nothing