Visitar URL original
Replace undefined with more descriptive error by brandonchinn178 · Pull Request #262 · haskell/alex · GitHub
Skip to content

Replace undefined with more descriptive error - #262

Merged
andreasabel merged 4 commits into
haskell:masterfrom
brandonchinn178:patch-1
Dec 30, 2024
Merged

andreasabel merged 4 commits into
haskell:masterfrom
brandonchinn178:patch-1

Conversation

@brandonchinn178

Copy link
Copy Markdown
Contributor

If this error is thrown, it's difficult to debug: https://gitlab.haskell.org/ghc/ghc/-/issues/25609

@andreasabel andreasabel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Would it be possible to add a reproducer?

@brandonchinn178

Copy link
Copy Markdown
Contributor Author

@andreasabel How's that?

@andreasabel

andreasabel commented Dec 30, 2024 •

Copy link
Copy Markdown
Member

Thanks!

Somehow the testsuite fails:
https://github.com/haskell/alex/actions/runs/12545028715/job/34978736577#step:9:97

make: *** No rule to make target 'issue_262.n.run', needed by 'tests'.

@andreasabel

Copy link
Copy Markdown
Member

Hopefully adding the missing issue_262.x to the extra-source-files fixes this...

@andreasabel andreasabel added this to the 3.5.2.0 milestone Dec 30, 2024
@andreasabel andreasabel added the error reporting Concerning errors thrown by alex label Dec 30, 2024
@andreasabel andreasabel self-assigned this Dec 30, 2024
@andreasabel

Copy link
Copy Markdown
Member

https://github.com/haskell/alex/actions/runs/12548981514/job/34989207762?pr=262#step:9:111

issue_262.x:21:11: error:
Illegal type signature: ‘SomeException’
Type signatures are only allowed in patterns with ScopedTypeVariables

@andreasabel
andreasabel merged commit 261aa08 into haskell:master Dec 30, 2024
@andreasabel

Copy link
Copy Markdown
Member

Released as 3.5.2.0.

@brandonchinn178
brandonchinn178 deleted the patch-1 branch December 30, 2024 17:18
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 13, 2025
## Changes in 3.5.2.0

* Use `byteSwap16#` and `byteSwap32#` on big-endian architectures instead of
  handrolling the implementation
  ([PR #260](haskell/alex#260)).
* More descriptive error in `alexScan`; inline `alexScanUser`
  ([PR #262](haskell/alex#262)).
* Tested with GHC 8.0 - 9.12.1.
hubot pushed a commit to ghc/ghc that referenced this pull request Jan 21, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12
hubot pushed a commit to ghc/ghc that referenced this pull request Jan 22, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12
hubot pushed a commit to ghc/ghc that referenced this pull request Jan 23, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12
hubot pushed a commit to ghc/ghc that referenced this pull request Jan 24, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12
hubot pushed a commit to ghc/ghc that referenced this pull request Jan 24, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12
hubot pushed a commit to ghc/ghc that referenced this pull request Jan 25, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12
hubot pushed a commit to ghc/ghc that referenced this pull request Jan 25, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12
hubot pushed a commit to ghc/ghc that referenced this pull request Jan 25, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12
TerrorJack pushed a commit to haskell-wasm/ghc that referenced this pull request Apr 6, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12

(cherry picked from commit a1d9237)
bgamari pushed a commit to ghc/ghc that referenced this pull request Sep 11, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12

(cherry picked from commit a1d9237)
bgamari pushed a commit to ghc/ghc that referenced this pull request Sep 12, 2025
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12

(cherry picked from commit a1d9237)
msk pushed a commit to msk/pkgsrc that referenced this pull request May 11, 2026
## Changes in 3.5.2.0

* Use `byteSwap16#` and `byteSwap32#` on big-endian architectures instead of
  handrolling the implementation
  ([PR #260](haskell/alex#260)).
* More descriptive error in `alexScan`; inline `alexScanUser`
  ([PR #262](haskell/alex#262)).
* Tested with GHC 8.0 - 9.12.1.
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this pull request May 14, 2026
## Changes in 3.5.2.0

* Use `byteSwap16#` and `byteSwap32#` on big-endian architectures instead of
  handrolling the implementation
  ([PR #260](haskell/alex#260)).
* More descriptive error in `alexScan`; inline `alexScanUser`
  ([PR #262](haskell/alex#262)).
* Tested with GHC 8.0 - 9.12.1.
tsutsui pushed a commit to tsutsui/pkgsrc that referenced this pull request Oct 17, 2026
## Changes in 3.5.2.0

* Use `byteSwap16#` and `byteSwap32#` on big-endian architectures instead of
  handrolling the implementation
  ([PR #260](haskell/alex#260)).
* More descriptive error in `alexScan`; inline `alexScanUser`
  ([PR #262](haskell/alex#262)).
* Tested with GHC 8.0 - 9.12.1.
bgamari pushed a commit to ghc/ghc that referenced this pull request Oct 27, 2026
This INLINE pragma for alexScanUser was added in 9.12, but then I
ported the change to alex in 3.5.2.0
(haskell/alex#262).

I didn't realize that GHC errors on duplicate INLINE pragmas, so
this ended up being a breaking change.

This change should be backported into 9.12

(cherry picked from commit a1d9237)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

error reporting Concerning errors thrown by alex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants