Skip to content

Commit

Permalink
off by 1
Browse files Browse the repository at this point in the history
  • Loading branch information
marklemay committed Jan 15, 2024
1 parent 67c4998 commit 4f103de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SourcePos.hs
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ fullChar s (SourcePos _ row char) = char + fullChar' (lines' s) row

fullChar' :: [String] -> Int -> Int
fullChar' _ 0 = 0
fullChar' (s:rest) lines | lines > 0 = length s + fullChar' rest (lines-1)

fullChar' (s:rest) lines | lines > 0 = length s + 1 + fullChar' rest (lines-1)



--eee = "data Unit : * {\n | tt : Unit\n};\n\n\ndata Unit : * {\n | tt : Uni\n};\n\n\ndata Unit : * {\n | tt : Unit\n};\n"

-- another missind std lib function
slice :: Int -> Int -> [a] -> [a]
Expand Down

0 comments on commit 4f103de

Please sign in to comment.