src/HOL/Typerep.thy
changeset 74375 ba880f3a4e52
parent 74345 e5ff77db6f38
equal deleted inserted replaced
74374:e585e5a906ba 74375:ba880f3a4e52
    30   in [(\<^syntax_const>\<open>_TYPEREP\<close>, K typerep_tr)] end
    30   in [(\<^syntax_const>\<open>_TYPEREP\<close>, K typerep_tr)] end
    31 \<close>
    31 \<close>
    32 
    32 
    33 typed_print_translation \<open>
    33 typed_print_translation \<open>
    34   let
    34   let
    35     fun typerep_tr' ctxt (*"typerep"*) \<^Type>\<open>fun \<open>\<^Type>\<open>itself T\<close>\<close> _\<close>
    35     fun typerep_tr' ctxt (*"typerep"*) \<^Type>\<open>fun \<^Type>\<open>itself T\<close> _\<close>
    36             (Const (\<^const_syntax>\<open>Pure.type\<close>, _) :: ts) =
    36             (Const (\<^const_syntax>\<open>Pure.type\<close>, _) :: ts) =
    37           Term.list_comb
    37           Term.list_comb
    38             (Syntax.const \<^syntax_const>\<open>_TYPEREP\<close> $ Syntax_Phases.term_of_typ ctxt T, ts)
    38             (Syntax.const \<^syntax_const>\<open>_TYPEREP\<close> $ Syntax_Phases.term_of_typ ctxt T, ts)
    39       | typerep_tr' _ T ts = raise Match;
    39       | typerep_tr' _ T ts = raise Match;
    40   in [(\<^const_syntax>\<open>typerep\<close>, typerep_tr')] end
    40   in [(\<^const_syntax>\<open>typerep\<close>, typerep_tr')] end