[GHC] #837: Infer fully qualified names to overcome namespace clashes

GHC trac at galois.com
Fri Jul 28 04:24:56 EDT 2006


#837: Infer fully qualified names to overcome namespace clashes
---------------------------------+------------------------------------------
  Reporter:  p.tanski at gmail.com  |          Owner:  nobody 
      Type:  feature request     |         Status:  closed 
  Priority:  normal              |      Milestone:         
 Component:  Compiler            |        Version:  6.4.2  
  Severity:  normal              |     Resolution:  wontfix
  Keywords:                      |             Os:  Unknown
Difficulty:  Unknown             |   Architecture:  Unknown
---------------------------------+------------------------------------------
Changes (by simonpj):

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

Comment:

 Java decides which variable you mean by looking at the types of its
 arguments.  Thus, if {{{x::C}}} and {{{y::D}}}, the calls {{{f(x)}}} and
 {{{f(y)}}} may call entirely different functions.

 That works well when the type of every variable is declared.  It does not
 work at all when the type of most variables is inferred.

 So Haskell does not use type clues to decide which 'f' you mean. Instead,
 it uses type classes.

 You might find [http://research.microsoft.com/%7Esimonpj/Papers/oo-
 haskell/index.htm Object-oriented overloading for Haskell] interesting.

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


More information about the Glasgow-haskell-bugs mailing list