* [Caml-list] Unexpected parsing
@ 2013-01-24 22:26 Jacques Carette
2013-01-24 23:00 ` Eric Cooper
0 siblings, 1 reply; 4+ messages in thread
From: Jacques Carette @ 2013-01-24 22:26 UTC (permalink / raw)
To: caml-list
Why is
> true ;;
parsed as Pexp_construct rather than Pexp_ident ? [This is Ocaml 4.01].
Jacques
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Unexpected parsing
2013-01-24 22:26 [Caml-list] Unexpected parsing Jacques Carette
@ 2013-01-24 23:00 ` Eric Cooper
2013-01-25 6:46 ` Arnaud Spiwack
0 siblings, 1 reply; 4+ messages in thread
From: Eric Cooper @ 2013-01-24 23:00 UTC (permalink / raw)
To: caml-list
On Thu, Jan 24, 2013 at 05:26:12PM -0500, Jacques Carette wrote:
> Why is
> > true ;;
> parsed as Pexp_construct rather than Pexp_ident ? [This is Ocaml 4.01].
Perhaps to be consistent with
type bool = false | true
--
Eric Cooper e c c @ c m u . e d u
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Unexpected parsing
2013-01-24 23:00 ` Eric Cooper
@ 2013-01-25 6:46 ` Arnaud Spiwack
2013-01-25 17:48 ` Gabriel Scherer
0 siblings, 1 reply; 4+ messages in thread
From: Arnaud Spiwack @ 2013-01-25 6:46 UTC (permalink / raw)
To: OCaML Mailing List
[-- Attachment #1: Type: text/plain, Size: 861 bytes --]
Quite :
# type drole = true of drole | false of drole*drole | HAHA;;
type drole = true of drole | false of drole * drole | HAHA
# false (false (true HAHA, HAHA), true (true (true (true HAHA))));;
- : drole = false (false (true HAHA, HAHA), true (true (true (true HAHA))))
On 25 January 2013 00:00, Eric Cooper <ecc@cmu.edu> wrote:
> On Thu, Jan 24, 2013 at 05:26:12PM -0500, Jacques Carette wrote:
> > Why is
> > > true ;;
> > parsed as Pexp_construct rather than Pexp_ident ? [This is Ocaml 4.01].
>
> Perhaps to be consistent with
> type bool = false | true
>
> --
> Eric Cooper e c c @ c m u . e d u
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
[-- Attachment #2: Type: text/html, Size: 1600 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Unexpected parsing
2013-01-25 6:46 ` Arnaud Spiwack
@ 2013-01-25 17:48 ` Gabriel Scherer
0 siblings, 0 replies; 4+ messages in thread
From: Gabriel Scherer @ 2013-01-25 17:48 UTC (permalink / raw)
To: Jacques Carette; +Cc: OCaML Mailing List
"true" and "false" being defined as keywords by the OCaml lexical
conventions ( http://caml.inria.fr/pub/docs/manual-ocaml/lex.html ),
it seems perfectly reasonable not to parse them as identifiers.
(That the implementation is overly permissive in accepting their use
in exotic way is another matter.)
On Fri, Jan 25, 2013 at 7:46 AM, Arnaud Spiwack
<Arnaud.Spiwack@lix.polytechnique.fr> wrote:
> Quite :
>
> # type drole = true of drole | false of drole*drole | HAHA;;
> type drole = true of drole | false of drole * drole | HAHA
> # false (false (true HAHA, HAHA), true (true (true (true HAHA))));;
> - : drole = false (false (true HAHA, HAHA), true (true (true (true HAHA))))
>
>
>
> On 25 January 2013 00:00, Eric Cooper <ecc@cmu.edu> wrote:
>>
>> On Thu, Jan 24, 2013 at 05:26:12PM -0500, Jacques Carette wrote:
>> > Why is
>> > > true ;;
>> > parsed as Pexp_construct rather than Pexp_ident ? [This is Ocaml 4.01].
>>
>> Perhaps to be consistent with
>> type bool = false | true
>>
>> --
>> Eric Cooper e c c @ c m u . e d u
>>
>> --
>> Caml-list mailing list. Subscription management and archives:
>> https://sympa.inria.fr/sympa/arc/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-25 17:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-24 22:26 [Caml-list] Unexpected parsing Jacques Carette
2013-01-24 23:00 ` Eric Cooper
2013-01-25 6:46 ` Arnaud Spiwack
2013-01-25 17:48 ` Gabriel Scherer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox