#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: |
---------------------------------+------------------------------------------
Comment(by simonpj):
Using record wild-cards you can write (nb untested)
{{{
updA :: Int -> Rec -> Rec
updA i (Rec { .. }) = Rec { a = i, .. }
updA _ Mt = Mt
}}}
which, I suppose, has the merit of making it obvious that you are
returning a `Rec` constructor.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5728#comment:3>
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