[GHC] #9437: Wrong error message when using `..' with a record update
GHC
ghc-devs at haskell.org
Tue Aug 12 18:22:23 UTC 2014
#9437: Wrong error message when using `..' with a record update
-------------------------------------+-------------------------------------
Reporter: elliottt | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
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.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9437>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list