Skip to content

Document origin coordinates of SourcePos#198

Open
tomsmeding wants to merge 1 commit intohaskell:masterfrom
tomsmeding:sourcepos-origin
Open

Document origin coordinates of SourcePos#198
tomsmeding wants to merge 1 commit intohaskell:masterfrom
tomsmeding:sourcepos-origin

Conversation

@tomsmeding
Copy link

Every time I use parsec and I have to do something with source positions, I find the SourcePos type and immediately wonder whether the line and column count from 0 or from 1. This is surprisingly hard to find when casually browsing the haddocks on Hackage: it is here in a non-haddock comment, and in the haddocks of initialPos, which is not exported from the root Text.Parsec module.

This PR puts the coordinate origin in the haddocks for SourcePos itself to free the user from having to look for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant