-
Notifications
You must be signed in to change notification settings - Fork 82
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
Deriving Ord for AlexPosn #233
Comments
@andreasabel @Ericson2314 Any opinion on this? :) |
@Kleidukos An Line 66 in 81aff83
The type itself is non-free: the second and third fields (line and column) are determined by the first field (character position). I think the derived (lexicographic) Ord instance would work nevertheless.Which implementation did you have in mind? |
Yes I was really going on with the basic |
This will be a minor version bump (even though Alex does not have to follow the PVP): add non-orphan instance. |
Kleidukos
added a commit
to Kleidukos/alex
that referenced
this issue
May 1, 2023
andreasabel
pushed a commit
to Kleidukos/alex
that referenced
this issue
May 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to use Alex with Megaparsec, whose Stream typeclass requires an Ord constraint on the elements of a list or sequence of tokens.
As I pre-lex my source input with Alex and turn it into a Seq of Ranged Tokens making use of AlexPosn for the position, it is the last thing that does not have an Ord instance.
I can provide a patch.
The text was updated successfully, but these errors were encountered: