[GHC] #5910: Holes with other constraints

GHC cvs-ghc at haskell.org
Sun Apr 22 15:25:33 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 spl):

 It seems to me that ambiguous types are the key problem here. We've been
 working on this a bit at UHac, but we haven't yet reached a solution.

 Thijs has already mentioned the problem with:

 {{{
 show _?x
 }}}

 Paolo has also pointed out the following:

 {{{
 data Foo a = Foo a
 data Bar1 = Bar1
 data Bar2 = Bar2

 instance Show (Foo Bar1) where
 instance Show (Foo Bar2) where

 test = show (Foo _?y)
 }}}

 What type do we get for the type of {{{_?y}}}? It appears unknowable.

 Perhaps we can solve only part of the problem.

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



More information about the Glasgow-haskell-bugs mailing list