unpack :: (Word8, Word8) -> (Nibble, Nibble, Nibble, Nibble)
unpack xy = case both unpackWord xy of
    ((h, l), (h', l')) -> (h, l, h', l')
  where
    unpackWord :: Word8 -> (Nibble, Nibble)
    unpackWord x = both fromIntegral $ x `divMod` 16
unpack :: (Word8, Word8) -> (Nibble, Nibble, Nibble, Nibble)
unpack xy = case both unpackWord xy of
    ((h, l), (h', l')) -> (h, l, h', l')
  where
    unpackWord :: Word8 -> (Nibble, Nibble)
    unpackWord x = both fromIntegral $ x `divMod` 16
unpack xy = case both unpackWord xy of
    ((h, l), (h', l')) -> (h, l, h', l')
  where
    unpackWord :: Word8 -> (Nibble, Nibble)
    unpackWord x = both fromIntegral $ x `divMod` 16