src/HOL/Library/Code_Integer.thy
changeset 29936 d3dfb67f0f59
parent 28562 4e74209f113e
child 30663 0b6aff7451b2
equal deleted inserted replaced
29935:0f0f5fb297ec 29936:d3dfb67f0f59
     1 (*  Title:      HOL/Library/Code_Integer.thy
     1 (*  Title:      HOL/Library/Code_Integer.thy
     2     ID:         $Id$
       
     3     Author:     Florian Haftmann, TU Muenchen
     2     Author:     Florian Haftmann, TU Muenchen
     4 *)
     3 *)
     5 
     4 
     6 header {* Pretty integer literals for code generation *}
     5 header {* Pretty integer literals for code generation *}
     7 
     6 
    70 code_const "op * \<Colon> int \<Rightarrow> int \<Rightarrow> int"
    69 code_const "op * \<Colon> int \<Rightarrow> int \<Rightarrow> int"
    71   (SML "IntInf.* ((_), (_))")
    70   (SML "IntInf.* ((_), (_))")
    72   (OCaml "Big'_int.mult'_big'_int")
    71   (OCaml "Big'_int.mult'_big'_int")
    73   (Haskell infixl 7 "*")
    72   (Haskell infixl 7 "*")
    74 
    73 
       
    74 code_const pdivmod
       
    75   (SML "(fn k => fn l =>/ IntInf.divMod/ (IntInf.abs k,/ IntInf.abs l))")
       
    76   (OCaml "(fun k -> fun l ->/ Big'_int.quomod'_big'_int/ (Big'_int.abs'_big'_int k)/ (Big'_int.abs'_big'_int l))")
       
    77   (Haskell "(\\k l ->/ divMod/ (abs k)/ (abs l))")
       
    78 
    75 code_const "eq_class.eq \<Colon> int \<Rightarrow> int \<Rightarrow> bool"
    79 code_const "eq_class.eq \<Colon> int \<Rightarrow> int \<Rightarrow> bool"
    76   (SML "!((_ : IntInf.int) = _)")
    80   (SML "!((_ : IntInf.int) = _)")
    77   (OCaml "Big'_int.eq'_big'_int")
    81   (OCaml "Big'_int.eq'_big'_int")
    78   (Haskell infixl 4 "==")
    82   (Haskell infixl 4 "==")
    79 
    83