tuned signature;
authorwenzelm
Fri, 06 Aug 2021 23:12:30 +0200
changeset 74137 49fd45ffd43f
parent 74136 7bbac3eb8adf
child 74138 cdac9e1f9bd1
tuned signature;
src/Tools/Haskell/Haskell.thy
--- a/src/Tools/Haskell/Haskell.thy	Fri Aug 06 21:05:35 2021 +0200
+++ b/src/Tools/Haskell/Haskell.thy	Fri Aug 06 23:12:30 2021 +0200
@@ -26,7 +26,7 @@
   make, unmake, pack, unpack,
   empty, null, length, index, all, any,
   head, last, take, drop, isPrefixOf, isSuffixOf,
-  concat, space, spaces, char, all_char, any_char, byte, max_byte, max_char, singleton
+  concat, space, spaces, char, all_char, any_char, byte, singleton
 )
 where
 
@@ -121,16 +121,10 @@
 byte :: Char -> Word8
 byte = toEnum . fromEnum
 
-max_byte :: Word8
-max_byte = maxBound
-
-max_char :: Char
-max_char = char max_byte
-
 singletons :: Array Word8 Bytes
 singletons =
-  array (0, max_byte)
-    [(i, make (ByteString.singleton i)) | i <- [0 .. max_byte]]
+  array (minBound, maxBound)
+    [(i, make (ByteString.singleton i)) | i <- [minBound .. maxBound]]
 
 singleton :: Word8 -> Bytes
 singleton b = singletons ! b