haskell-graphql / graphql-api

Write type-safe GraphQL services in Haskell
BSD 3-Clause "New" or "Revised" License
406 stars 35 forks source link

Annotate AST elements with position in original document #75

Open jml opened 7 years ago

jml commented 7 years ago

If we keep the line & column when we parse documents, we can give better error messages: not just for parsing failures, but also for validation errors (this name is duplicated, for example).

teh commented 7 years ago

Probably not trivial with attoparsec though we could of course count manually: https://github.com/bos/attoparsec/issues/16