fromBitsDiffN :: FromBits a => Int -> [Bool] -> ([a] -> [a], [Bool])
fromBitsDiffN n bs
  | n >  0    = case fromBits1 bs of
                  (Nothing, rs) -> (id  , rs)
                  (Just a , rs) -> case fromBitsDiffN (n - 1) rs of
                    (f, ss) -> ((a:) . f, ss)
  | n == 0    = (id, bs)
  | n <  0    = error "Invalid count"
  | null bs   = (id, [])
  | otherwise = error "Error"
fromBitsDiffN :: FromBits a => Int -> [Bool] -> ([a] -> [a], [Bool])
fromBitsDiffN n bs
  | n >  0    = case fromBits1 bs of
                  (Nothing, rs) -> (id  , rs)
                  (Just a , rs) -> case fromBitsDiffN (n - 1) rs of
                    (f, ss) -> ((a:) . f, ss)
  | n == 0    = (id, bs)
  | n <  0    = error "Invalid count"
  | null bs   = (id, [])
  | otherwise = error "Error"
fromBitsDiffN n bs
  | n >  0    = case fromBits1 bs of
                  (Nothing, rs) -> (id  , rs)
                  (Just a , rs) -> case fromBitsDiffN (n - 1) rs of
                    (f, ss) -> ((a:) . f, ss)
  | n == 0    = (id, bs)
  | n <  0    = error "Invalid count"
  | null bs   = (id, [])
  | otherwise = error "Error"