-- | Convert a bit queue to a list of bits by unconsing.
-- This is used to test that the queue functions properly.
toListQ :: BitQueue -> [Bool]
toListQ bq = case unconsQ bq of
      Nothing -> []
      Just (hd, tl) -> hd : toListQ tl
toListQ :: BitQueue -> [Bool]
toListQ bq = case unconsQ bq of
      Nothing -> []
      Just (hd, tl) -> hd : toListQ tl
toListQ bq = case unconsQ bq of
      Nothing -> []
      Just (hd, tl) -> hd : toListQ tl