Skip to content

Change equational constraints on IsString (Parser a) to a ~ () #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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