| This is almost exactly what I want. There is one thing I don't understand
| though. Namely the __letrec defining:
|
| incL_akO = incL_akH
| incL_akH = ... incL_ak0 ...
|
| Why this indirection? Is this also because the desugarer tries to do the most
| simple thing?

Yes, that's why.

| And is there a preprocess function that translates this into:
|
| incL_akH = ... incL_akH ... ?

Sure!  Just run the simplifier.  It has plenty of knobs to tell it how hard to 
try.

In particular,  simplifyPgm has this type
simplifyPgm :: SimplifierMode
            -> [SimplifierSwitch]
            -> HscEnv
            -> UniqSupply
            -> RuleBase
            -> ModGuts
            -> IO (SimplCount, ModGuts)  -- New bindings

Setting the SimplifierMode to SimplGently makes the simplifier just do the bare 
minimum.  It's probably what you want.

Simon
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to