#5728: Warnings from -fwarn-incomplete-record-updates even with all constructors
matched
---------------------------------+------------------------------------------
Reporter: mjo | Owner:
Type: bug | Status: new
Priority: normal | Milestone: _|_
Component: Compiler | Version: 7.4.1
Keywords: warnings | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Incorrect warning at
compile-time
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by maeder):
* version: 7.2.1 => 7.4.1
Comment:
Even for an explicit @-Pattern I get this warning.
{{{
{-# OPTIONS -fwarn-incomplete-record-updates #-}
data Rec = Mt | Rec {a, b, c, d, e, f, g :: Int}
updA :: Int -> Rec -> Rec
updA i r@(Rec {}) = r { a = i }
updA _ Mt = Mt
}}}
How should I change just "updA" (without mentioning the other fields) to
avoid the warning?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5728#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs