Skip to content

Wrong error message when using `..' with a record update

Using `..' inside of a record update should report that it's an error to do so, but instead reports that it's an empty update. Consider this module:

{{{ # LANGUAGE RecordWildCards #

module Test where

data Foo = Foo { x :: Int }

test :: Foo -> Foo test foo = foo { .. } }}}

When loaded, it complains about the empty record update of foo, instead of complaining about `..' being used during an update.

GHCi, version 7.8.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Test             ( test.hs, interpreted )

test.hs:8:16: Empty record update of: foo
Failed, modules loaded: none.
Trac metadata
Trac field Value
Version 7.8.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information