83 |
83 |
84 (* classes and sorts *) |
84 (* classes and sorts *) |
85 |
85 |
86 val classesP = |
86 val classesP = |
87 OuterSyntax.command "classes" "declare type classes" K.thy_decl |
87 OuterSyntax.command "classes" "declare type classes" K.thy_decl |
88 (Scan.repeat1 (P.name -- Scan.optional (P.$$$ "<" |-- P.!!! (P.list1 P.xname)) []) |
88 (Scan.repeat1 (P.name -- Scan.optional ((P.$$$ "\\<subseteq>" || P.$$$ "<") |-- |
|
89 P.!!! (P.list1 P.xname)) []) |
89 -- P.marg_comment >> (Toplevel.theory o IsarThy.add_classes)); |
90 -- P.marg_comment >> (Toplevel.theory o IsarThy.add_classes)); |
90 |
91 |
91 val classrelP = |
92 val classrelP = |
92 OuterSyntax.command "classrel" "state inclusion of type classes (axiomatic!)" K.thy_decl |
93 OuterSyntax.command "classrel" "state inclusion of type classes (axiomatic!)" K.thy_decl |
93 (P.xname -- (P.$$$ "<" |-- P.!!! P.xname) -- P.marg_comment |
94 (P.xname -- ((P.$$$ "\\<subseteq>" || P.$$$ "<") |-- P.!!! P.xname) -- P.marg_comment |
94 >> (Toplevel.theory o IsarThy.add_classrel)); |
95 >> (Toplevel.theory o IsarThy.add_classrel)); |
95 |
96 |
96 val defaultsortP = |
97 val defaultsortP = |
97 OuterSyntax.command "defaultsort" "declare default sort" K.thy_decl |
98 OuterSyntax.command "defaultsort" "declare default sort" K.thy_decl |
98 (P.sort -- P.marg_comment >> (Toplevel.theory o IsarThy.add_defsort)); |
99 (P.sort -- P.marg_comment >> (Toplevel.theory o IsarThy.add_defsort)); |
666 |
667 |
667 val keywords = |
668 val keywords = |
668 ["!", "!!", "%", "%%", "(", ")", "+", ",", "--", ":", "::", ";", "<", |
669 ["!", "!!", "%", "%%", "(", ")", "+", ",", "--", ":", "::", ";", "<", |
669 "<=", "=", "==", "=>", "?", "[", "]", "and", "binder", "concl", |
670 "<=", "=", "==", "=>", "?", "[", "]", "and", "binder", "concl", |
670 "files", "in", "infixl", "infixr", "is", "output", "overloaded", |
671 "files", "in", "infixl", "infixr", "is", "output", "overloaded", |
671 "|", "\\<rightharpoonup>", "\\<leftharpoondown>", |
672 "|", "\\<equiv>", "\\<rightharpoonup>", "\\<leftharpoondown>", |
672 "\\<rightleftharpoons>", "\\<equiv>"]; |
673 "\\<rightleftharpoons>", "\\<subseteq>"]; |
673 |
674 |
674 val parsers = [ |
675 val parsers = [ |
675 (*theory structure*) |
676 (*theory structure*) |
676 theoryP, end_excursionP, contextP, |
677 theoryP, end_excursionP, contextP, |
677 (*markup commands*) |
678 (*markup commands*) |