Skip to content

Conversation

sol
Copy link
Member

@sol sol commented Apr 20, 2025

I think I just got this wrong when I originally implemented this (888b7d7, 0265427).

When you parse a constant string it is not really useful to inspect the parse result. For that reason I think it is justified to change the type from Parser Text to Parser ().

This doesn't make a difference for applicative-style code, but it helps with monadic code, making it -Wall sane, e.g. you can now say

parser = do
  ...
  "foo"
  ...

instead of

parser = do
  ...
  _ <- "foo"
  ...

Technically this is a breaking change, but I have a hard time to imagine non-contrived code that would break from this.

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