Re: Question about correct GHC-API use for type checking (or zonking, or tidying)

2013-08-30 Thread p.k.f.holzenspies
I feel so unbelievably ignorant now. I thought with all the IORefs in the type checking process that zonking did this in these refs. Somehow I started thinking that some of these remained in SDocs, not thinking showSDoc is pure and results in a String, which holds no IORefs. Does this mean

RE: Question about correct GHC-API use for type checking (or zonking, or tidying)

2013-08-30 Thread Simon Peyton-Jones
Haskell is a *functional* language. Consider say $ pre-zonk: ++ pp all_expr_ty zonkTcType all_expr_ty say $ post-zonk: ++ pp all_expr_ty pp is a pure function; it is given the same input both times, so of course it produces the same output. If you collect the result of