X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FOctet.hs;h=bdada65ab1b8e11bb52d95bdf33a7a25d4ce751c;hb=7d9a55cb4f217bada3c66f585cd1ce35dc564fb1;hp=aaff3d2e0415a5029a13b5bb9fe957b449e26bd5;hpb=609ae9195c946f0be8d5105d8a590f9b32941ef7;p=hath.git diff --git a/src/Octet.hs b/src/Octet.hs index aaff3d2..bdada65 100644 --- a/src/Octet.hs +++ b/src/Octet.hs @@ -13,7 +13,13 @@ data Octet = None | Octet { b1 :: Bit, b6 :: Bit, b7 :: Bit, b8 :: Bit } - deriving (Eq, Show) + deriving (Eq) + + +instance Show Octet where + show Octet.None = "None" + show oct = show (octet_to_int oct) + -- Convert each bit to its integer value, and multiply by the -- appropriate power of two. Sum them up, and we should get an integer