src/Pure/Tools/class_package.ML
changeset 22222 bb07dd6cb1b9
parent 22209 86b688409dde
child 22302 bf5bdb7f7607
equal deleted inserted replaced
22221:8a8aa6114a89 22222:bb07dd6cb1b9
   572 val parse_arity =
   572 val parse_arity =
   573   (P.xname --| P.$$$ "::" -- P.!!! P.arity)
   573   (P.xname --| P.$$$ "::" -- P.!!! P.arity)
   574     >> (fn (tyco, (asorts, sort)) => ((tyco, asorts), sort));
   574     >> (fn (tyco, (asorts, sort)) => ((tyco, asorts), sort));
   575 
   575 
   576 val classP =
   576 val classP =
   577   OuterSyntax.command classK "define operational type class" K.thy_decl (
   577   OuterSyntax.command classK "define type class" K.thy_decl (
   578     P.name --| P.$$$ "="
   578     P.name --| P.$$$ "="
   579     -- (
   579     -- (
   580       class_subP --| P.$$$ "+" -- class_bodyP
   580       class_subP --| P.$$$ "+" -- class_bodyP
   581       || class_subP >> rpair []
   581       || class_subP >> rpair []
   582       || class_bodyP >> pair [])
   582       || class_bodyP >> pair [])