diff options
author | Alina Banerjee <alina@glitchgirl.us> | 2021-08-05 08:08:31 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-08-11 18:15:05 -0400 |
commit | 100ffe75f509a73f1b26e768237888646f522b6c (patch) | |
tree | 56702bfdf582572a41b1bfbe9b066039023c0f95 /compiler/GHC/Tc | |
parent | f5fdace5613914724eb00bcf7547c82f3ad12686 (diff) | |
download | haskell-100ffe75f509a73f1b26e768237888646f522b6c.tar.gz |
Modify InlineSpec data constructor (helps fix #18138)
The inl_inline field of the InlinePragma record is modified to store pragma
source text by adding a data constructor of type SourceText. This can help in
tracking the actual text of pragma names.
Add/modify functions, modify type instance for InlineSpec type
Modify parser, lexer to handle InlineSpec constructors containing SourceText
Modify functions with InlineSpec type
Extract pragma source from InlineSpec for SpecSig, InlineSig types
Modify cvtInline function to add SourceText to InlineSpec type
Extract name for InlineSig, SpecSig from pragma, SpectInstSig from source (fixes #18138)
Extract pragma name for SpecPrag pragma, SpecSig signature
Add Haddock annotation for inlinePragmaName function
Add Haddock annotations for using helper functions in hsSigDoc
Remove redundant ppr in pragma name for SpecSig, InlineSig; update comment
Rename test to T18138 for misplaced SPECIALIZE pragma testcase
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r-- | compiler/GHC/Tc/Gen/Sig.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Gen/Sig.hs b/compiler/GHC/Tc/Gen/Sig.hs index f318bfd140..67715e9b5b 100644 --- a/compiler/GHC/Tc/Gen/Sig.hs +++ b/compiler/GHC/Tc/Gen/Sig.hs @@ -581,7 +581,7 @@ mkPragEnv sigs binds get_sig _ = Nothing add_arity n inl_prag -- Adjust inl_sat field to match visible arity of function - | Inline <- inl_inline inl_prag + | isInlinePragma inl_prag -- add arity only for real INLINE pragmas, not INLINABLE = case lookupNameEnv ar_env n of Just ar -> inl_prag { inl_sat = Just ar } |