Dear Sven,

> However for the other parameters, I use empty values:
> 3) emptyGlobalRdrEnv
> 4) emptyTypeEnv
> This actually works (at least for the simple cases I have tested).
> But it seems wrong to me to pass two empty environments.
> Can I somehow obtain valid environments?

(disclaimer: I am _very_ new to this!) You may be able to extract 
those fields from the "ModGuts"obtained by compiling the file that 
you are traversing.

> Another question: Why is dsExpr monadic?
> What side effects could there possibly be?

The desugaring process (of which dsExpr is a part) creates a 
bunch of distinct ("fresh") names. To do so it needs to tap 
into the Unique supply (see newUniqueId.) In addition, the 
DsM tracks some environments, source locations (getSrcSpanDs, 
putSrcSpanDs) etc...

Ranjit.

_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to