logo       

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

lang.haskell.glasgow.bugs

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

#837: Infer fully qualified names to overcome namespace clashes
---------------------------------+------------------------------------------
Reporter: p.tanski@xxxxxxxxx | 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_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise