Twan van Laarhoven wrote:
Hello ghc developers,
I have finished converting the ghc compiler to do notation. Here is a
patchset.
Changes in the patch:
- Use do notation instead of `thenX` everywhere.
- Use return instead of returnX everywhere.
- Use standard functions from Control.Monad instead of mapX, zipWithX,
etc.
- Changed some monad types from type synonyms to newtypes, so they can
be instances of Monad.
- There is a new class MonadUnique that contains newUnique, newUniques
and newUniqueSupply.
- I renamed the AGraph concatenation operator from <*> to <#>, because
there were conflicts with Applicative.
- While I was at it, I converted tabs to spaces in all lines that I
touched.
Thanks for the patch! And thanks for splitting it up. For most of them
we'll review and apply, but we'll probably hold the codeGen patches back
because we have a large outstanding branch that will be severely conflicted
by these changes, and it would be better to wait until that branch is
merged first.
The patchset is split into 99 patches, most of which touch one file each.
The next phase of the ghc code cleanup will be to use libraries instead
of custom utility modules. This will add dependencies on:
- collections
- pretty
- and maybe bytestring
Does anyone have a problem with that?
Be careful - our current compatibility requirements are that GHC must
bootstrap using 6.2.2, which had no Data.Map for example, and certainly no
bytestring. Cleanups that add dependencies are not always a step in the
right direction, we have to be quite conservative here.
Perhaps for 6.10 we could move the bar up to 6.4? Anyone have any thoughts
on that?
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc