Strangeness in the syntax of types

Simon Peyton-Jones simonpj at microsoft.com
Tue Jun 23 11:37:03 EDT 2009


| > The reason why ctypedoc and ctype were so different before, is because
| > they drifted apart after ctypedoc was added. ctype was changed (I
| > think during implementation of the TypeFamilies extension) without any
| > changes to ctypedoc. This was fixed in HEAD not so long ago.
| 
| Thanks a lot for the information, then I know. So the correct thing to
| do is to put a ctype in the recursive position after the context. I
| sorely wish these things were better documented...

Me too.  But you know the reason: so much to do, so little time.  Plus, if code drifts apart from code (as it did above), you may imagine that document drifts apart from code even more.

The best thing to do, I think, is to comment the code liberally.  I particularly recommend the Note [blah] comments described in http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle

If you'd like to add some such clarifying notes to Parser.y.pp, that'd be great.  We'd gladly check them for veracity!

Simon


More information about the Glasgow-haskell-users mailing list