Skip to content
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

Add a stock Ord instance for AlexPosn #234

Merged
merged 6 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Change in 3.3.0

* Add an `Ord` instance to `AlexPosn` (Issue [#233](https://github.com/haskell/alex/issues/233)).

_Andreas Abel, 2023-05-14_

## Change in 3.2.7.4

* The user-supplied "epilogue" Haskell code is now put _last_ in the generated file.
Expand Down
2 changes: 1 addition & 1 deletion src/ParseMonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ alexGetByte (p,_,[],(c:s)) = let p' = alexMove p c
-- assuming the usual eight character tab stops.

data AlexPosn = AlexPn !Int !Int !Int
deriving (Eq,Show)
deriving (Eq, Show, Ord)
Kleidukos marked this conversation as resolved.
Show resolved Hide resolved

alexStartPos :: AlexPosn
alexStartPos = AlexPn 0 1 1
Expand Down