[GHC] #11432: Cannot export operator newtype

GHC ghc-devs at haskell.org
Fri Jan 15 17:53:24 UTC 2016


#11432: Cannot export operator newtype
-------------------------------------+-------------------------------------
        Reporter:  phadej            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  8.0.1-rc1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 There's not going to be an easy solution to this. The problem is that we
 only know that `(-.->)` is a type when we see the open parenthesis after
 it. But the parser has only one-token lookahead.

 I would actually say that the current behavior -- requiring `type` -- is
 correct. We then have a rule that's simple for both parsers and people:
 any symbol not beginning with a `:` is assumed to be a variable, not a
 type.

 Note that we don't need to worry about standards-compliance here, as
 `TypeOperators` is not standardized. If it doesn't already,
 `TypeOperators` should imply `ExplicitNamespaces`.

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


More information about the ghc-tickets mailing list