[GHC] #5910: Holes with other constraints

GHC cvs-ghc at haskell.org
Sun Apr 22 16:57:44 CEST 2012


#5910: Holes with other constraints
----------------------------------------+-----------------------------------
    Reporter:  xnyhps                   |       Owner:                                   
        Type:  feature request          |      Status:  new                              
    Priority:  normal                   |   Milestone:                                   
   Component:  Compiler (Type checker)  |     Version:  7.5                              
    Keywords:  holes                    |          Os:  Unknown/Multiple                 
Architecture:  Unknown/Multiple         |     Failure:  Incorrect warning at compile-time
  Difficulty:  Unknown                  |    Testcase:                                   
   Blockedby:                           |    Blocking:                                   
     Related:                           |  
----------------------------------------+-----------------------------------

Comment(by simonpj):

 Do send a new patch with the simpler implementation I describe above.

 Concernign this ambiguity stuff, what is the behaviour you ''want''?  A
 good way to articulate this woudl be to write the manual section for
 holes.

 I imagine that what you want is:
  * A hole is always reported
  * A hole is treated like a type error; that is, reported as an error
 unless you use `-fdefer-type-errors` in which case you get a warning and a
 run-time error.
  * If there is a hole you probably want to suppress ambiguity errors; this
 prioritisation is done in `TcErrors.reportInsolsAndFlats`.

 If you can say waht you want I think it'll be easy enough to achieve.

 Simon

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



More information about the Glasgow-haskell-bugs mailing list