"S. Alexander Jacobson" <[EMAIL PROTECTED]> asks:
> What does unresolved top level overloading mean in this context?
> 
> > instance DBConnection OracleConnection where
> >  openConnection dbms string = OracleConnection
> 
> > test = openConnection Oracle "odbc:odbcURL"
> 
> Test must be an OracleConnection.
> Why do I get an "unresolved top level overloading" error?


I think you're reasoning as follows:

  There's only one instance of DBConnection therefore, when
  Haskell sees a DBConnection context, it can assume it's that
  instance.

That's the "closed world interpretation".  ie All I have now is 
all there ever will be.  (cf "negation as failure" in Prolog)

Haskell uses the "open world interpretation" which assumes that
you could come along with a second instance any moment.


Alastair


Reply via email to