caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [Q] How to use merlin with mikmatch_str ?
@ 2015-08-27 12:45 Matej Kosik
       [not found] ` <1440680128794.50230274@Nodemailer>
  0 siblings, 1 reply; 3+ messages in thread
From: Matej Kosik @ 2015-08-27 12:45 UTC (permalink / raw)
  To: caml-list

Hi,

I would like to ask if there is any way how to use "merlin" with "mikmatch_str"
(or in general any other syntax extension) ?

Now, when I open my source code in vim while merlin is enabled, for mikmatch_str-related constructions merlin complains, e.g.:

	Error: Unbound constructor RE

Is there a way to use them both (mikmatch_str & merlin) at the same time?

Thanks in advance!!

--

Matej

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

* Re: [Caml-list] [Q] How to use merlin with mikmatch_str ?
       [not found] ` <1440680128794.50230274@Nodemailer>
@ 2015-08-27 13:48   ` Matej Kosik
  2015-08-27 13:59     ` Gabriel Scherer
  0 siblings, 1 reply; 3+ messages in thread
From: Matej Kosik @ 2015-08-27 13:48 UTC (permalink / raw)
  To: Runhang Li, OCaml

On 08/27/2015 02:55 PM, Runhang Li wrote:
> Hi, Matej
> 
> See if this issue answers your question: https://github.com/the-lambda-church/merlin/issues/358
> 
> You can see all extensions that are being supported at src/kernel/extension.ml [1] .
> 
> [1] : https://github.com/the-lambda-church/merlin/blob/master/src/kernel/extension.ml#L49

Hi,

If I understand this correctly, then the support for a particular syntactic extension need to be hardwired into merlin?

Isn't that strange?

(compared to tools such as:

	- ocamlc
	- ocamlopt
	- ocamldep
	- ocamldoc

 which need not to be sperately modified to support any new (valid) syntactic extension. Do they?
)

Why is merlin different in this respect?

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

* Re: [Caml-list] [Q] How to use merlin with mikmatch_str ?
  2015-08-27 13:48   ` Matej Kosik
@ 2015-08-27 13:59     ` Gabriel Scherer
  0 siblings, 0 replies; 3+ messages in thread
From: Gabriel Scherer @ 2015-08-27 13:59 UTC (permalink / raw)
  To: Matej Kosik; +Cc: Runhang Li, OCaml

Merlin solves the harder problem of incremental type-checking: if you
make a small modification to your code buffer, it will compute the
difference between the previous and the current state and try to only
re-{parse,typecheck} this.
This approach is elegant and, in the long run, necessary to guarantee
the fluidity necessary for interactive usage (although in practice
compilation is fast enough that you might be able to make do with a
batch re-checking fallback in many scenarios).

Currently Merlin breaks the abstraction of the OCaml parser and
type-checker, to turns them into incremental-aware tools; but Merlin
authors are trying to get their changes upstream as much as possible.

This also means that the world of supported syntaxes is closed, it
cannot be extended with arbitrary syntax extensions if they were
designed to support batch preprocessing only, with no interface to use
them incrementally. (But merlin authors have implemented support for
some common extensions in their incremental parser.)

On Thu, Aug 27, 2015 at 3:48 PM, Matej Kosik
<5764c029b688c1c0d24a2e97cd764f@gmail.com> wrote:
> On 08/27/2015 02:55 PM, Runhang Li wrote:
>> Hi, Matej
>>
>> See if this issue answers your question: https://github.com/the-lambda-church/merlin/issues/358
>>
>> You can see all extensions that are being supported at src/kernel/extension.ml [1] .
>>
>> [1] : https://github.com/the-lambda-church/merlin/blob/master/src/kernel/extension.ml#L49
>
> Hi,
>
> If I understand this correctly, then the support for a particular syntactic extension need to be hardwired into merlin?
>
> Isn't that strange?
>
> (compared to tools such as:
>
>         - ocamlc
>         - ocamlopt
>         - ocamldep
>         - ocamldoc
>
>  which need not to be sperately modified to support any new (valid) syntactic extension. Do they?
> )
>
> Why is merlin different in this respect?
>
> --
> 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] 3+ messages in thread

end of thread, other threads:[~2015-08-27 14:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-27 12:45 [Caml-list] [Q] How to use merlin with mikmatch_str ? Matej Kosik
     [not found] ` <1440680128794.50230274@Nodemailer>
2015-08-27 13:48   ` Matej Kosik
2015-08-27 13:59     ` Gabriel Scherer

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).