Skip to content

Conversation

@meooow25
Copy link
Contributor

These were added long ago in 06e91ac as an improvement on the already existing INLINE pragmas. We can get rid of these unnecessary (and confusing to contributors) ifdefs today since we do not have other compilers where we want the non-INLINABLE behavior to apply.

@meooow25
Copy link
Contributor Author

Motivated by #1163 (comment)

@treeowl
Copy link
Contributor

treeowl commented Dec 25, 2025

Aren't they there because INLINABLE isn't a Report standard feature?

@meooow25
Copy link
Contributor Author

That's a good point to consider, here's the report on pragmas: https://www.haskell.org/onlinereport/haskell2010/haskellch12.html

An implementation is not required to respect any pragma, although pragmas that are not recognised by the implementation should be ignored.

So, if the non-GHC compiler follows the report there should be no problems with unguarded INLINABLE pragmas.

@treeowl
Copy link
Contributor

treeowl commented Dec 25, 2025

They'll very likely throw up a slew of warnings 🫤. That hypothetical problem is probably worth incurring to remove the actual clutter though.

@meooow25
Copy link
Contributor Author

meooow25 commented Dec 25, 2025

Yes, I also think cleaning up the clutter would be nice. For what it's worth, MHS is the only such compiler at the moment and it's not complaining.

These were added long ago in 06e91ac as an improvement on GHC over the
already existing INLINE pragmas. We can get rid of these unnecessary
(and confusing to contributors) ifdefs today since we do not have other
compilers where we want the non-INLINABLE behavior to apply.

While INLINABLE is not a standard pragma listed in the Haskell 2010
report, the report also specifies that unrecognized pragmas should be
ignored. So we don't expect this to cause issues for non-GHC compilers.
MicroHs quietly ignores them as expected.
@meooow25 meooow25 merged commit d77b0f5 into haskell:master Jan 11, 2026
15 checks passed
@meooow25 meooow25 deleted the remove-ifdefghcs branch January 11, 2026 13:08
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.

2 participants