ghc6 behavior with circular instance declaration

Kenny haskellmail at yahoo.com.sg
Thu Oct 23 18:53:23 EDT 2003


Hi Simon,

 --- Simon Peyton-Jones <simonpj at microsoft.com> wrote:
 
> I don't know why you would possibly want this.

yes, in this example there isn't any obvious reason to
motivate us writing such instance, but I am interested
in how GHC now handles coinduction in type class. It
will be neat if we can express coinductive algorithm
in terms of Haskell type class. Currently I am working
a project with Dr Martin Sulzmann in which we think
such an extension is neccessary.

> So far as I can see from your message, the recursive
> dictionary
> you are trying to build is exactly the same as what
> GHC will build
> automatically from the "conventional" instance
> declaration.
Yes, exactly, I realized that after I compiled the
code with -fext-core flag. Is it because it tries to
avoid building infinite evidence constructors?

Thanks for pointing out. 

Regards,
Kenny LU Zhuo Ming

Research Assistant
School of Computing
National University of Singapore



__________________________________________________
Do You Yahoo!?
Faster. Easier. Bingo. 
http://sg.search.yahoo.com


More information about the Haskell mailing list