[Haskell-cafe] Design your modules for qualified import

Johan Tibell johan.tibell at gmail.com
Sat Jun 7 06:31:46 EDT 2008

On Fri, Jun 6, 2008 at 8:35 PM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
>  import Text.ParserCombinators.Parsec as P
> Now I only have to write "P.runPaser", which is much shorter.

Or maybe even

> import Text.ParserCombinators.Parsec as Parser

and then `Parser.run'.

Having the module hierarchy be shallower so you don't have to add a
`as' to every import might also help. I think Python does this better
for common modules which have short and sweet name lite `system'.



More information about the Haskell-Cafe mailing list