Skip to content

Extract correct source text for SPECIALIZE instance pragma (Fixes #18138)

Alina Banerjee requested to merge wip/fix-18138 into master

Replaces !3280 (closed). I am sorry for creating an extra MR but the source branch for !3280 (closed) seems to be missing and reviewing the current set of commits in this one should be easier.

This merge request:

  • modifies the InlineSpec constuctor with type SourceText for tracking pragma source text
  • modifies relevant type instances, the lexer, the parser, compiler/GHC/Core, compiler/GHC/HsToCore/ functions for newer InlineSpec constructor
  • uses updated InlineSpec to extract pragma source from SpecInstSig, InlineSig signatures
  • extracts SPECIALIZE pragma name for SpecSig signature, SpecPrag pragma from pragma source
  • extracts pragma name for InlineSig, SpecSig from pragma
  • extracts pragma name for SpectInstSig from source (fixes #18138 (closed))
  • Rename test for misplaced SPECIALIZE pragma to T18138

Merge request reports