Made BootString instance of Show, Eq and Typeable

darcs-hash:20080102145747-a4fee-af290555ad724b015336c8f08595ef95990877e6
This commit is contained in:
Henning Guenther 2008-01-02 06:57:47 -08:00
parent 0e4f3e9d2b
commit a56e3cfb8a

View File

@ -1,3 +1,4 @@
{-# LANGUAGE DeriveDataTypeable #-}
{- | This implements BootString en- and decoding, the foundation of Punycode {- | This implements BootString en- and decoding, the foundation of Punycode
-} -}
module Data.Encoding.BootString module Data.Encoding.BootString
@ -8,6 +9,7 @@ import Data.Encoding.Base
import Data.ByteString.Char8 (pack,unpack) import Data.ByteString.Char8 (pack,unpack)
import Data.List (unfoldr,partition) import Data.List (unfoldr,partition)
import Data.Char (ord,chr) import Data.Char (ord,chr)
import Data.Typeable
data BootString = BootString data BootString = BootString
{base :: Int {base :: Int
@ -18,6 +20,7 @@ data BootString = BootString
,init_bias :: Int ,init_bias :: Int
,init_n :: Int ,init_n :: Int
} }
deriving (Show,Eq,Typeable)
punycode :: BootString punycode :: BootString
punycode = BootString punycode = BootString