--- a/src/HOL/Library/Code_Natural.thy Thu Aug 26 12:19:49 2010 +0200
+++ b/src/HOL/Library/Code_Natural.thy Thu Aug 26 12:19:50 2010 +0200
@@ -9,9 +9,7 @@
section {* Alternative representation of @{typ code_numeral} for @{text Haskell} and @{text Scala} *}
code_include Haskell "Natural"
-{*import Data.Array.ST;
-
-newtype Natural = Natural Integer deriving (Eq, Show, Read);
+{*newtype Natural = Natural Integer deriving (Eq, Show, Read);
instance Num Natural where {
fromInteger k = Natural (if k >= 0 then k else 0);
@@ -54,8 +52,8 @@
code_reserved Haskell Natural
-code_include Scala "Natural" {*
-import scala.Math
+code_include Scala "Natural"
+{*import scala.Math
object Nat {
--- a/src/HOL/Library/Efficient_Nat.thy Thu Aug 26 12:19:49 2010 +0200
+++ b/src/HOL/Library/Efficient_Nat.thy Thu Aug 26 12:19:50 2010 +0200
@@ -242,8 +242,8 @@
and @{typ int}.
*}
-code_include Haskell "Nat" {*
-newtype Nat = Nat Integer deriving (Eq, Show, Read);
+code_include Haskell "Nat"
+{*newtype Nat = Nat Integer deriving (Eq, Show, Read);
instance Num Nat where {
fromInteger k = Nat (if k >= 0 then k else 0);
@@ -280,8 +280,8 @@
code_reserved Haskell Nat
-code_include Scala "Nat" {*
-import scala.Math
+code_include Scala "Nat"
+{*import scala.Math
object Nat {