summaryrefslogtreecommitdiff
path: root/Parse.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Parse.hs')
-rw-r--r--Parse.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/Parse.hs b/Parse.hs
index 0ee5004..e4eca84 100644
--- a/Parse.hs
+++ b/Parse.hs
@@ -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 ->