[Haskell-cafe] Cyclic Inclusions

C.M.Brown cmb21 at kent.ac.uk
Tue Aug 12 05:59:48 EDT 2008


Andrew,

Thanks very much for your reponse. It was very helpful; this makes a lot
of sense!

Regards,
Chris.

On Mon, 11 Aug 2008 ajb at spamcop.net wrote:

> G'day all.
>
> Quoting "C.M.Brown" <cmb21 at kent.ac.uk>:
>
> > Yes, I saw that, thanks! I guess this is because it's hard to compile a
> > mutually recursive module...
>
> It's because you don't need to declare the types of exported definitions.
>
> Consider, this highly artificial example:
>
>      module A where
>
>      import B
>
>      f (x,y) = g (x,'A')
>
>
>      module B where
>
>      import A
>
>      g (x,y) = f (True,y)
>
> To infer the types of f and g, you need to analyse both modules together.
>
> And yes, some people think that this is a bug in the specification.
>
> Cheers,
> Andrew Bromage
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list