Re: Curry module system

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Fri, 27 Jan 2006 16:36:07 +0100

Wolfgang Jeltsch wrote:
> > 2. As a consequence of 1., it seems reasonable that in a Curry program
> > stored in file "Prog.curry" with a missing module head, the default
> > module head "module Prog where" is inserted (currently, the report
> > states that in this case the standard module head "module main where"
> > is inserted).
>
> Of course, inserting "module Prog where" is not what typical Haskell systems
> do since they insert "module Main where". Is it feasible to introduce an
> incompatibility to Haskell here?

Initially, I proposed this conformity with Haskell and I usually
prefer whenever possible.
However, I do not know in which cases the compatibility with
Haskell is really helpful here. If we require that a module Prog
should be stored in file Prog.curry, then inserting
"module Main where" seems to make no sense and is a contradiction
to this general rule. Furthermore, I do not see any advantage
of inserting "Main" rather than "Prog".

Finally, I think such a rule is also conform with the "laziness
of programming". When I write a prototypical code, I often
omit declarations that can be inferred by the compiler, e.g.,
type declarations. If the code is stable, I (or some tool)
insert them for documentation purposes. In the same way,
the inferred code for the module head should be compatible
with the code that I write down. However, it seems odd to
write the module head "Main" in a module that is not stored
in Main.curry.

Maybe I have missed some point?

Best regards,

Michael

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Fr Jan 27 2006 - 17:25:21 CET

This archive was generated by hypermail 2.3.0 : Fr Mär 29 2024 - 07:15:07 CET