[GHC] #8258: GHC accepts `data Foo where` in H2010 mode

GHC ghc-devs at haskell.org
Thu Sep 10 12:20:28 UTC 2015


#8258: GHC accepts `data Foo where` in H2010 mode
-------------------------------------+-------------------------------------
        Reporter:  hvr               |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  low               |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.0.4
  (Parser)                           |
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  GHC accepts       |  Unknown/Multiple
  invalid program                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by thomie):

 * component:  Compiler => Compiler (Parser)


Comment:

 `c = 5 where` is ok.

 From https://www.haskell.org/onlinereport/haskell2010/haskellch4.html:
 {{{
 decl    →       (funlhs | pat) rhs

 rhs     →       = exp [where decls]

 decls   →       { decl1 ; … ; decln }       (n ≥ 0)
 }}}

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


More information about the ghc-tickets mailing list