getHeaderSize :: FilePath -> IO Int
getHeaderSize file = do
    bs <- BL.readFile file
    let Just tc = decode bs :: Maybe Test
    let len = sum $ map toT $ cases tc
    return len
  where
    toT (Case _ _ hs _) = sum $ map (\(x,y) -> BS.length x + BS.length y) hs
getHeaderSize :: FilePath -> IO Int
getHeaderSize file = do
    bs <- BL.readFile file
    let Just tc = decode bs :: Maybe Test
    let len = sum $ map toT $ cases tc
    return len
  where
    toT (Case _ _ hs _) = sum $ map (\(x,y) -> BS.length x + BS.length y) hs
getHeaderSize file = do
    bs <- BL.readFile file
    let Just tc = decode bs :: Maybe Test
    let len = sum $ map toT $ cases tc
    return len
  where
    toT (Case _ _ hs _) = sum $ map (\(x,y) -> BS.length x + BS.length y) hs