[GHC] #2044: "Can't unify" error in debugger

GHC trac at galois.com
Tue Apr 15 07:03:32 EDT 2008


#2044: "Can't unify" error in debugger
--------------------+-------------------------------------------------------
 Reporter:  r6144   |          Owner:  mnislaih
     Type:  bug     |         Status:  assigned
 Priority:  normal  |      Milestone:  6.8.3   
Component:  GHCi    |        Version:  6.8.2   
 Severity:  normal  |     Resolution:          
 Keywords:          |     Difficulty:  Unknown 
 Testcase:          |   Architecture:  x86     
       Os:  Linux   |  
--------------------+-------------------------------------------------------
Comment (by mnislaih):

 Sorry, by "should not touch the types of function types", I mean that
 :print can only reconstruct types for non-function values, and thus it
 does not deal with the types of function values. A function value for
 :print is a Fun closure.

 When a call to a polymorphic function is done, the outer level foralls are
 instantiated and eliminated. The role of :print is to find out what is the
 particular instantiation. But this is true for outer level foralls only.
 For higher rank foralls inside Type Constructors, that is, impredicative
 types (is this the correct terminology ?) I am in doubt, since I don't
 understand the implications of impredicative types. These foralls are
 restrictions too after all, which have already been checked. Is it ok to
 drop them? I need to do some reading.

 By the way an interesting question about typeclass predicates.
 Suppose we have a function type `forall a. Show a => a -> a`. If :print
 recovers a concrete type for the first arg., then by assumption this type
 is an instance of Show. If :print does not recover a type, it would be
 nice to pack the dictionary, which :print has access to, and say "x has
 type Show a => a and you can call show for it in GHCi", but I don't see
 how that can be expressed. But even more, maybe can we use the
 dictionaries themselves for recovering more types ?

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


More information about the Glasgow-haskell-bugs mailing list