firstColumnSize :: BSL.ByteString -> Integer
firstColumnSize line = let
                           (pre,_) = BSL.break (isSpace . e2e) line
                           (num,unit) = BSL.break (isAlpha . e2e) pre
                           (preComm,postComm) = BSL.break ((`elem` ".,") . e2e) num

                           toString = map e2e . BSL.unpack
                           readSafe x = (fst . last) $ (0,"") : reads x

                           a,b,c :: Ratio Integer
                           a = readSafe (toString preComm) % 1
                           b = let l = fromIntegral $ 10 * BSL.length postComm in
                               case l of
                                 0 -> 0
                                 _ -> readSafe (toString postComm) % l
                           c = (transUnit (toString unit)) % 1
                           result = round ((a+b) * c)
                       in 
#ifdef DEBUG
                         traceShow (map round [a,b,c], map toString [line,pre,num,preComm,postComm,unit]) result
firstColumnSize :: BSL.ByteString -> Integer
firstColumnSize line = let
                           (pre,_) = BSL.break (isSpace . e2e) line
                           (num,unit) = BSL.break (isAlpha . e2e) pre
                           (preComm,postComm) = BSL.break ((`elem` ".,") . e2e) num

                           toString = map e2e . BSL.unpack
                           readSafe x = (fst . last) $ (0,"") : reads x

                           a,b,c :: Ratio Integer
                           a = readSafe (toString preComm) % 1
                           b = let l = fromIntegral $ 10 * BSL.length postComm in
                               case l of
                                 0 -> 0
                                 _ -> readSafe (toString postComm) % l
                           c = (transUnit (toString unit)) % 1
                           result = round ((a+b) * c)
                       in 
#ifdef DEBUG
                         traceShow (map round [a,b,c], map toString [line,pre,num,preComm,postComm,unit]) result
firstColumnSize line = let
                           (pre,_) = BSL.break (isSpace . e2e) line
                           (num,unit) = BSL.break (isAlpha . e2e) pre
                           (preComm,postComm) = BSL.break ((`elem` ".,") . e2e) num

                           toString = map e2e . BSL.unpack
                           readSafe x = (fst . last) $ (0,"") : reads x

                           a,b,c :: Ratio Integer
                           a = readSafe (toString preComm) % 1
                           b = let l = fromIntegral $ 10 * BSL.length postComm in
                               case l of
                                 0 -> 0
                                 _ -> readSafe (toString postComm) % l
                           c = (transUnit (toString unit)) % 1
                           result = round ((a+b) * c)
                       in 
#ifdef DEBUG
                         traceShow (map round [a,b,c], map toString [line,pre,num,preComm,postComm,unit]) result