referring to deeply embedded definitions

Christian Maeder maeder@tzi.de
Fri, 18 Jul 2003 19:53:18 +0200


Hal Daume wrote:
> Suppose I have:
> 
> 
>>module M1 where
>>import M2
>>foo = 'a'
> 
> 
> and
> 
>>module M2 where
>>import M3
> 
> 
> and
> 
> 
>>module M3 where
>>foo = True
> 
> 
> Now, inside M1, I want to write something like:
> 
> 
>>bar = if M2.foo then M1.foo else 'b'

M2 must reexport "foo":

module M2 (foo) where
import M3