nats in Haskell are readable
authorhaftmann
Fri, 21 May 2010 11:50:34 +0200
changeset 37050 4a021f6be77c
parent 37032 58a0757031dd
child 37051 d3ad914e3e02
nats in Haskell are readable
src/HOL/Library/Efficient_Nat.thy
--- a/src/HOL/Library/Efficient_Nat.thy	Thu May 20 21:19:38 2010 -0700
+++ b/src/HOL/Library/Efficient_Nat.thy	Fri May 21 11:50:34 2010 +0200
@@ -252,7 +252,7 @@
 *}
 
 code_include Haskell "Nat" {*
-newtype Nat = Nat Integer deriving (Show, Eq);
+newtype Nat = Nat Integer deriving (Eq, Show, Read);
 
 instance Num Nat where {
   fromInteger k = Nat (if k >= 0 then k else 0);