diff options
author | Tom Smeding <tom@tomsmeding.com> | 2022-02-22 14:39:19 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2022-02-22 14:39:19 +0100 |
commit | f859444fbe15812c3eb96cfc1377723c7a853aeb (patch) | |
tree | 6cc9eba16e6190824502194673ae60685ada0b2d | |
parent | c23b7b5517d7ac5d0a6b2ff8a4f4914c2f392261 (diff) |
-rw-r--r-- | Parse.hs | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -12,6 +12,8 @@ import Data.ByteString (ByteString) import Data.Char import Data.List (unfoldr) +import Debug.Trace + import Prof @@ -29,6 +31,7 @@ data Columns parseProf :: ByteString -> Either String (Prof ()) parseProf input = do (cols, lns) <- maybe (Left "Did not find tree header") Right (findTree (BS.split 10 input)) + traceM (show cols) lns' <- concat <$> mapM (parseLine cols) lns case buildTree lns' of Just (tree, []) -> return (Prof tree) @@ -102,11 +105,11 @@ parseLeadingTreeLine bs = do return $ Columns { cMod = cmod , cSrc = csrc , cNo = cno - , cCnt = cno + 5 - , cIvT = centr + 6 - , cIvA = civt + 4 - , cIhT = civa + 5 - , cIhA = ciht + 4 } + , cCnt = cno + 6 + , cIvT = centr + 7 + , cIvA = civt + 5 + , cIhT = civa + 6 + , cIhA = ciht + 5 } where findCol :: String -> Int -> ByteString -> Maybe (Int, ByteString) findCol stag from = \line -> |