
#12379: WARN pragma gives warning `warning: [-Wdeprecations]' -------------------------------------+------------------------------------- Reporter: zilinc | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: Incorrect (amd64) | warning at compile-time Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Example: {{{#!hs -- Warn.hs module Warn where __todo :: String -> a {-# WARNING __todo "TODO" #-} __todo msg = error $ "TODO: " ++ msg }}} {{{#!hs -- Main.hs {- OPTIONS_GHC -Wall #-} import Warn inc :: Int -> Int inc n | n >= 0 = n + 1 inc _ = __todo "what about negatives?" }}} When compile the files (or ghci), I get {{{ UseWarn.hs:9:9: warning: [-Wdeprecations] In the use of ‘__todo’ (imported from Warn): "TODO" }}} Should the flag be `-Wwarnings-deprecations`? And `-Wdeprecations` is not in the user guide, if it is a genuine flag. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12379 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler