3 data Bit = None | Zero | One
6 instance Show Bit where
12 bit_to_int :: Bit -> Int
17 -- If we are passed a '0' or '1', convert it appropriately. Otherwise,
19 bit_from_char :: Char -> Bit
20 bit_from_char '0' = Zero
21 bit_from_char '1' = One
22 bit_from_char _ = None