caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* OCalDE
@ 2007-07-23 16:21 Christophe Raffalli
  2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
  2007-07-31 11:22 ` Nicolas Bros
  0 siblings, 2 replies; 7+ messages in thread
From: Christophe Raffalli @ 2007-07-23 16:21 UTC (permalink / raw)
  To: caml-list


Dear list members,

Here is a list of questions I have about eclipse and OCalDE (some of them probably easy,
because I am not used to eclipse):

- How can I tell eclipse parser about my own camlp4 extension ?

- How can I configure some "Run script" (typically a "make check" launched from eclipse), to test
and debug my code ?

- I find that "format using camlp4" adds to much parenthesis, is it possible to do something about 
it (it is probably necessary to fine tune the camlp4 pretty printer ?)

- The "Content Assist" menu is very nice ... but even with the proper folder added to the Project 
Path, It does not always work for my own local function (this may be related to my next question)

- I use unison ... I told it not to synchronise ~/.eclipse and ~/worspace/.metadata, but this does 
not work well enough (If I create a project on another machine, the new project needs to be added on 
the other machine despite the fact that the folder was copied by unison in the workspace folder). So 
what is the correct way to use unison together with eclipse (I am afraid to make a mess in eclipse 
files) ? (remark I do not quit always eclipse before synchronisation with unison)

- No progress about the darcs incompatibility related to "linked URLs" used by OCaIDE and not 
supported by darcs eclipse.

- I had two or three time a file opened where all modifications where in fact not performed on the 
filesystem (closing and reopening the file solved the problem). Is this a known bug with eclipse (I 
can not reproduce it yet) ?

Cheers,
-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] OCalDE
  2007-07-23 16:21 OCalDE Christophe Raffalli
@ 2007-07-25  7:27 ` Nicolas Bros
  2007-07-25  7:41   ` Christophe Raffalli
                     ` (2 more replies)
  2007-07-31 11:22 ` Nicolas Bros
  1 sibling, 3 replies; 7+ messages in thread
From: Nicolas Bros @ 2007-07-25  7:27 UTC (permalink / raw)
  To: Christophe Raffalli; +Cc: caml-list

> How can I tell eclipse parser about my own camlp4 extension ?

For now, you can't. OcaIDE uses a custom parser written in Java,
copied from the rules of the original Ocaml parser. So, it only parses
standard syntax.
To parse a modified syntax, the file would first have to be processed
by camlp4.
But then, how would OcaIDE get the positions of the elements in the
original unprocessed file?

> How can I configure some "Run script" (typically a "make check" launched from
> eclipse), to test and debug my code ?

Custom makefile targets will be supported in a future version.

> I find that "format using camlp4" adds to much parenthesis, is it possible to do
> something about it (it is probably necessary to fine tune the camlp4 pretty printer ?)

I think you know a lot more about camlp4 than I, so I guess you're right.

> what is the correct way to use unison together with eclipse

I don't use unison, so I can't help you.

> No progress about the darcs incompatibility related to "linked URLs" used by OCaIDE
> and not supported by darcs eclipse.

I think this is more of a problem with darcs than with OcaIDE.


> I had two or three time a file opened where all modifications where in fact not
> performed on the filesystem (closing and reopening the file solved the problem).
> Is this a known bug with eclipse (I can not reproduce it yet) ?

Usually, this happens the other way around: the Eclipse workspace does
not reflect changes on the file system until you refresh your
workspace in Eclipse.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] OCalDE
  2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
@ 2007-07-25  7:41   ` Christophe Raffalli
  2007-07-25  9:24   ` Alain Frisch
  2007-07-25  9:33   ` Jon Harrop
  2 siblings, 0 replies; 7+ messages in thread
From: Christophe Raffalli @ 2007-07-25  7:41 UTC (permalink / raw)
  To: Nicolas Bros; +Cc: caml-list

Nicolas Bros a écrit :
>> How can I tell eclipse parser about my own camlp4 extension ?
>
> For now, you can't. OcaIDE uses a custom parser written in Java,
> copied from the rules of the original Ocaml parser. So, it only parses
> standard syntax.
> To parse a modified syntax, the file would first have to be processed
> by camlp4.
> But then, how would OcaIDE get the positions of the elements in the
> original unprocessed file?
>
>
You could take the same approach than proof general for eclipse, writte 
a parser with anything (this includes camlp4)
whose output is a copy of the original file with xml annotation. Such a 
parser should allow camlp4 extension ...

The main problem, is that appart from the xml annotation the text should 
not be changed, so a camlp4 pretty-printer will not workd. However, the 
parser could simply produce the position where to add xml annotation 
that are inserter in a second phase into the original
input ...

So what needs to be written is a camlp4 parser that produce pairs with 
positions and xml annotation ... and that also perform a little error 
recovery ...
>> No progress about the darcs incompatibility related to "linked URLs" 
>> used by OCaIDE
>> and not supported by darcs eclipse.
>
> I think this is more of a problem with darcs than with OcaIDE.
>
Yes, probably, but what is a "linked URL" and what is their use in 
OCaIDE ? If it is the link to the ocaml library, then
it is strange that darcs think linked URL matters ?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] OCalDE
  2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
  2007-07-25  7:41   ` Christophe Raffalli
@ 2007-07-25  9:24   ` Alain Frisch
  2007-07-25 15:32     ` Nicolas Bros
  2007-07-25  9:33   ` Jon Harrop
  2 siblings, 1 reply; 7+ messages in thread
From: Alain Frisch @ 2007-07-25  9:24 UTC (permalink / raw)
  To: Nicolas Bros, caml-list

Nicolas Bros wrote:
>> How can I tell eclipse parser about my own camlp4 extension ?
> 
> For now, you can't. OcaIDE uses a custom parser written in Java,
> copied from the rules of the original Ocaml parser. So, it only parses
> standard syntax.
> To parse a modified syntax, the file would first have to be processed
> by camlp4.
> But then, how would OcaIDE get the positions of the elements in the
> original unprocessed file?

Camlp4 makes this information available when it dumps a binary version 
of the Caml AST. If the problem is to read this marshaled value, it 
should not be too difficult to write another printer for Camlp4 (e.g. 
xml-ish, json-ish or lisp-ish, dependening on what is easier to parse in 
OcaIDE).


-- Alain


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] OCalDE
  2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
  2007-07-25  7:41   ` Christophe Raffalli
  2007-07-25  9:24   ` Alain Frisch
@ 2007-07-25  9:33   ` Jon Harrop
  2 siblings, 0 replies; 7+ messages in thread
From: Jon Harrop @ 2007-07-25  9:33 UTC (permalink / raw)
  To: caml-list

On Wednesday 25 July 2007 08:27:58 Nicolas Bros wrote:
> For now, you can't. OcaIDE uses a custom parser written in Java,
> ...

I was wondering how the Eclipse plug-in was written given that the underlying 
infrastructure is written in Java. Would it not be much easier to develop an 
IDE in OCaml using something like LablGTK?

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?e


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] OCalDE
  2007-07-25  9:24   ` Alain Frisch
@ 2007-07-25 15:32     ` Nicolas Bros
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Bros @ 2007-07-25 15:32 UTC (permalink / raw)
  To: Alain Frisch; +Cc: caml-list

> Camlp4 makes this information available when it dumps a binary version
> of the Caml AST. If the problem is to read this marshaled value, it
> should not be too difficult to write another printer for Camlp4 (e.g.
> xml-ish, json-ish or lisp-ish, dependening on what is easier to parse in
> OcaIDE).

That is a good idea, but how do you write a camlp4 printer? I have
never used camlp4, and I couldn't find documentation on this point.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] OCalDE
  2007-07-23 16:21 OCalDE Christophe Raffalli
  2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
@ 2007-07-31 11:22 ` Nicolas Bros
  1 sibling, 0 replies; 7+ messages in thread
From: Nicolas Bros @ 2007-07-31 11:22 UTC (permalink / raw)
  To: Christophe Raffalli; +Cc: caml-list

> How can I configure some "Run script" (typically a "make check" launched from
> eclipse), to test and debug my code ?

I just remembered this:
You can use the "External tools" in Eclipse in "Run > External Tools >
Open External Tools Dialog...". Here, you can create a program launch
configuration, define what executable to launch ("make"), in which
directory to start it ("${project_loc}"), and give it "check" as
argument to follow your example. You can also add it as a favorite to
access it faster.

Then, you will be able to start it by clicking on the "External tools"
button on the tools bar.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-07-31 11:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-23 16:21 OCalDE Christophe Raffalli
2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
2007-07-25  7:41   ` Christophe Raffalli
2007-07-25  9:24   ` Alain Frisch
2007-07-25 15:32     ` Nicolas Bros
2007-07-25  9:33   ` Jon Harrop
2007-07-31 11:22 ` Nicolas Bros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).