Re: [GHC] #2213: -Wall incorrectly warns Defined but not used for functions exported via RULES
#2213: -Wall incorrectly warns Defined but not used for functions exported via RULES --+- Reporter: dons | Owner: dons Type: bug | Status: assigned Priority: normal| Milestone: 6.10 branch Component: Compiler |Version: 6.8.2 Severity: normal| Resolution: Keywords:| Difficulty: Unknown Testcase:| Architecture: Unknown Os: Unknown | --+- Changes (by igloo): * difficulty: = Unknown * milestone: = 6.10 branch Comment: This is currently rather odd. You need one of `ScopedTypeVariables`, `PolymorphicComponents`, `ExistentialQuantification`, `Rank2Types` and `RankNTypes` enabled, as these all turn on lexing of `forall`. Really, there ought to be a flag for rewrite rules instead (which also turns on lexing of `forall`). -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2213#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2213: -Wall incorrectly warns Defined but not used for functions exported via RULES
#2213: -Wall incorrectly warns Defined but not used for functions exported via RULES -+-- Reporter: dons |Owner: dons Type: bug | Status: assigned Priority: normal|Milestone: Component: Compiler | Version: 6.8.2 Severity: normal| Resolution: Keywords:| Testcase: Architecture: Unknown | Os: Unknown -+-- Changes (by dons): * status: new = assigned * owner: = dons Comment: Ah, worked this one out. `-fglasgow-exts` is needed to enable rules, otherwise they're considered comments. (Hence the type error in this rule is silently ignored). Note however, strangely, `-frewrite-rules` *doesn't* fix this. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2213#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #2213: -Wall incorrectly warns Defined but not used for functions exported via RULES
#2213: -Wall incorrectly warns Defined but not used for functions exported via RULES +--- Reporter: dons | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 6.8.2|Severity: normal Keywords: |Testcase: Architecture: Unknown | Os: Unknown +--- Functions exported via rewrite rules are incorrectly flagged as defined but not used when -Wall is enabled: {{{ module M ({- rules -}) where eq :: Eq a = a - a - Bool eq = (==) {-# RULES rule 1 forall x. x == y = y `eq` x #-} }}} Will emit a bogus: {{{ M.hs:4:0: Warning: Defined but not used: `eq' }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2213 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs