Skip to content

Document allowed syntax in WARNING and DEPRECATED pragmas

GHC accepts the following deprecation pragma:

{-# DEPRECATED f ["f is deprecated","use g instead"] #-}
f :: a -> a
f x = x

The deprecation message here is a list of strings. I didn't expect this to be allowed because https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#warning-and-deprecated-pragmas only shows examples where the deprecation message is a single string.

Are there other forms of deprecation message allowed by GHC?

Trac metadata
Trac field Value
Version 8.0.2
Type Bug
TypeOfFailure OtherFailure
Priority lowest
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information