#1497: Rebinding (:) -- built-in syntax, or just another constructor?
----------------------------------+-----------------------------------------
    Reporter:  dons               |        Owner:             
        Type:  bug                |       Status:  closed     
    Priority:  low                |    Milestone:             
   Component:  Compiler (Parser)  |      Version:  6.6        
    Severity:  normal             |   Resolution:  invalid    
    Keywords:                     |   Difficulty:  Easy (1 hr)
          Os:  Unknown            |     Testcase:             
Architecture:  Multiple           |  
----------------------------------+-----------------------------------------
Changes (by simonmar):

  * resolution:  => invalid
  * status:  new => closed

Comment:

 GHC is right here, I think.  It's disallowed by the Haskell 98 syntax: a
 data declaration can define a `consym`, which excludes all `reservedop`,
 and `:` is one of the `reservedop`s.

 Of course it's convenient for the compiler to allow you to define `:`,
 because then the Prelude can define the built-in list type, which is
 probably why Hugs allows this.  GHC   also does this, but adds extra
 checks to disallow defining `:` outisde of the standard libraries, as per
 Haskell 98.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1497>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to