Andrew Coppin wrote:
Until very recently, it was not at all clear to me that there is actually a very simple solution to this problem:

 import Text.ParserCombinators.Parsec as P

Now I only have to write "P.runPaser", which is much shorter.

This fact probably needs to be mentioned more loudly - I'm sure I'm not the only person to have overlooked it...

I have one efficient way to find all the needed language
 features without reading the specification from the start to
 the end or waiting till my questions get answered. The point
 is that common sense will indicate you where the required
 features should be logically located in the language grammar.
 E.g. if you want something related to imported modules it is
 logical to check all the alternatives available in import
 declaration. Then I check the grammar how the production for
 import declaration (impdelc) looks like (where it can be used
 etc.). Mostly it is enough sometimes I need to check the
 language specification since it is not obvious from the
 grammar.

The result is that when I learn a new language the first thing
 I'm looking for is the formal grammar. Luckily most languages
 have it available. Some languages (like Haskell) are obsessed
 with shortcuts and the result is that their grammar is a bit
 cryptic; others (like VHDL) have it just great - production
 names clearly indicate what they actually do. On the other
 side haskell has nice online report :-)

Peter.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to