[GHC] #12379: WARN pragma gives warning `warning: [-Wdeprecations]'

#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

#12379: WARN pragma gives warning `warning: [-Wdeprecations]'
-------------------------------------+-------------------------------------
Reporter: zilinc | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Documentation | Version: 8.0.1
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: Documentation | (amd64)
bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* failure: Incorrect warning at compile-time => Documentation bug
* component: Compiler => Documentation
Comment:
This commit explains it:
27abb1f52b023d7bc8a796e22e5e7ef281df0fcb
{{{
Author: Simon Marlow

#12379: WARN pragma gives warning `warning: [-Wdeprecations]' -------------------------------------+------------------------------------- Reporter: zilinc | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Documentation | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * keywords: => newcomer * os: Linux => Unknown/Multiple * architecture: x86_64 (amd64) => Unknown/Multiple -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12379#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12379: WARN pragma gives warning `warning: [-Wdeprecations]' -------------------------------------+------------------------------------- Reporter: zilinc | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Documentation | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tmcgilchrist): Just checking my understanding of what needs to be done here. Do I simply change the occurrences of `ghc-flag:: -Wwarnings-deprecations` with `ghc-flag:: -Wwarn-warnings-deprecations`? Are there docs on how to build the things under `doc/users_guide`? When I do a make from the top level it seems to be just building the compiler. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12379#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12379: WARN pragma gives warning `warning: [-Wdeprecations]' -------------------------------------+------------------------------------- Reporter: zilinc | Owner: (none) Type: bug | Status: merge Priority: low | Milestone: 8.2.1 Component: Documentation | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => merge * milestone: => 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12379#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12379: WARN pragma gives warning `warning: [-Wdeprecations]' -------------------------------------+------------------------------------- Reporter: zilinc | Owner: (none) Type: bug | Status: closed Priority: low | Milestone: 8.2.1 Component: Documentation | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged in 986deaa5539552f84b4f1d1872ae8a4c8240097e. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12379#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC