2006/8/6, Joel Björnson <[EMAIL PROTECTED]>:
So far, so good... However, problems arises trying to define the function :
test = toElem myElem

Yielding the error message : 'No instance for (Show Elem) arising use of `toElem` at ...'

For some reason it seems like the type checker picks the *wrong* 'toElem', and that the type of 'myElem' can't be properly determined (without adding explicit type signatures). It seems strange though the the type of myElem really can be determined and that the instance (IsElem Elem) is more specific then the instance for Show types.

 I've received some information pointing me to that the problem arises due to the -fallow-incoherent-instances flag, which I´ve been using.
Without this flag the function 'test' above works as expected...

/Joel
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to