src/HOL/Product_Type.thy
changeset 34886 873c31d9f10d
parent 33959 2afc55e8ed27
child 34900 9b12b0824bfe
equal deleted inserted replaced
34878:d7786f56f081 34886:873c31d9f10d
    97 
    97 
    98 code_type unit
    98 code_type unit
    99   (SML "unit")
    99   (SML "unit")
   100   (OCaml "unit")
   100   (OCaml "unit")
   101   (Haskell "()")
   101   (Haskell "()")
       
   102   (Scala "Unit")
   102 
   103 
   103 code_instance unit :: eq
   104 code_instance unit :: eq
   104   (Haskell -)
   105   (Haskell -)
   105 
   106 
   106 code_const "eq_class.eq \<Colon> unit \<Rightarrow> unit \<Rightarrow> bool"
   107 code_const "eq_class.eq \<Colon> unit \<Rightarrow> unit \<Rightarrow> bool"
   108 
   109 
   109 code_const Unity
   110 code_const Unity
   110   (SML "()")
   111   (SML "()")
   111   (OCaml "()")
   112   (OCaml "()")
   112   (Haskell "()")
   113   (Haskell "()")
       
   114   (Scala "()")
   113 
   115 
   114 code_reserved SML
   116 code_reserved SML
   115   unit
   117   unit
   116 
   118 
   117 code_reserved OCaml
   119 code_reserved OCaml
   118   unit
   120   unit
       
   121 
       
   122 code_reserved Scala
       
   123   Unit
   119 
   124 
   120 
   125 
   121 subsection {* Pairs *}
   126 subsection {* Pairs *}
   122 
   127 
   123 subsubsection {* Product type, basic operations and concrete syntax *}
   128 subsubsection {* Product type, basic operations and concrete syntax *}
   993 
   998 
   994 code_type *
   999 code_type *
   995   (SML infix 2 "*")
  1000   (SML infix 2 "*")
   996   (OCaml infix 2 "*")
  1001   (OCaml infix 2 "*")
   997   (Haskell "!((_),/ (_))")
  1002   (Haskell "!((_),/ (_))")
       
  1003   (Scala "!((_),/ (_))")
   998 
  1004 
   999 code_instance * :: eq
  1005 code_instance * :: eq
  1000   (Haskell -)
  1006   (Haskell -)
  1001 
  1007 
  1002 code_const "eq_class.eq \<Colon> 'a\<Colon>eq \<times> 'b\<Colon>eq \<Rightarrow> 'a \<times> 'b \<Rightarrow> bool"
  1008 code_const "eq_class.eq \<Colon> 'a\<Colon>eq \<times> 'b\<Colon>eq \<Rightarrow> 'a \<times> 'b \<Rightarrow> bool"
  1004 
  1010 
  1005 code_const Pair
  1011 code_const Pair
  1006   (SML "!((_),/ (_))")
  1012   (SML "!((_),/ (_))")
  1007   (OCaml "!((_),/ (_))")
  1013   (OCaml "!((_),/ (_))")
  1008   (Haskell "!((_),/ (_))")
  1014   (Haskell "!((_),/ (_))")
       
  1015   (Scala "!((_),/ (_))")
  1009 
  1016 
  1010 code_const fst and snd
  1017 code_const fst and snd
  1011   (Haskell "fst" and "snd")
  1018   (Haskell "fst" and "snd")
  1012 
  1019 
  1013 types_code
  1020 types_code