On 23/05/2008, at 10:35 AM, Erick Tryzelaar wrote:
>
> Actually, both ocamldoc and ocamldep accept search path options, so we
> can still use those. I agree that it can be a bit of a pain though. We
> could build pack files though, then you could at least do Pack.Module
> for the modules using the library.

Don't use pack .. the design is all wrong.

>
>>> Are you talking about c-style switches?
>>
>> Yes, more or less. At the moment a goto-chain is synthesised in the
>> front end. This is bad, because it prevents later type analysis, for
>> example
>> checking case completeness.
>
>
> How much work do you think it'll take to add this? Are they expanded
> before the type checking? If so, it'd probably be more difficult than
> I expected.

Yes, they're expanded in the desugaring phase, before lookup
or type checking. In fact there are multiple kinds of matches,
which are really quite distinct, and the kind is deduced from
the syntactic structure of the match..for example:


        match e with | x ..

is a match against a union constructor .. because 'x' is a name.
That's why

        val x = 1;
        match e with | x -> { println "one"; } ...

doesn't work and you have to write

        match e with | 1 -> ..

literally a 1 to get an integer match: the distinction is based on the
match term syntax NOT the "type" of the pattern.

In fact, the match kind could easily be partly established by the
type of the argument "e" .. not completely, eg range vs value matches,
but "mostly" .. :)

Clearly this would be better, since then the integer match against
a non-literal value would have a chance to work.

--
john skaller
[EMAIL PROTECTED]





-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to