1 (* Title: HOL/Library/Code_Char.thy
2 Author: Florian Haftmann
5 header {* Code generation of pretty characters (and strings) *}
8 imports Plain "~~/src/HOL/List" "~~/src/HOL/Code_Eval"
17 fold (fn target => add_literal_char target) ["SML", "OCaml", "Haskell"]
18 #> add_literal_list_string "Haskell"
21 code_instance char :: eq
30 code_const "eq_class.eq \<Colon> char \<Rightarrow> char \<Rightarrow> bool"
31 (SML "!((_ : char) = _)")
32 (OCaml "!((_ : char) = _)")
33 (Haskell infixl 4 "==")
35 code_const "Code_Eval.term_of \<Colon> char \<Rightarrow> term"
36 (SML "HOLogic.mk'_char/ (IntInf.fromInt/ (Char.ord/ _))")