[GHC] #10520: RecordWildCards causes “is not a (visible) field of constructor” in ghci

GHC ghc-devs at haskell.org
Sun Jun 14 15:49:07 UTC 2015


#10520: RecordWildCards causes “is not a (visible) field of constructor” in ghci
-------------------------------------+-------------------------------------
              Reporter:  ion1        |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  GHCi        |           Version:  7.10.1
              Keywords:              |  Operating System:  Linux
  RecordWildCards                    |   Type of failure:  GHC rejects
          Architecture:  x86_64      |  valid program
  (amd64)                            |        Blocked By:
             Test Case:              |   Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 {{{
 % ghc -ignore-dot-ghci -e 'data Foo = Bar { baz :: Integer } deriving
 Show' -e 'Bar 42' -e '(Bar 42){ baz = 43 }' -e 'Bar { baz = 42 }'
 Bar {baz = 42}
 Bar {baz = 43}
 Bar {baz = 42}
 }}}

 {{{
 % ghc -ignore-dot-ghci -XRecordWildCards -e 'data Foo = Bar { baz ::
 Integer } deriving Show' -e 'Bar 42' -e '(Bar 42){ baz = 43 }' -e 'Bar {
 baz = 42 }'
 Bar {baz = 42}
 Bar {baz = 43}

 <interactive>:1:7:
     ‘baz’ is not a (visible) field of constructor ‘Bar’
 }}}

 {{{
 % ghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.10.1
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10520>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list