Questions tagged [tuareg]

An Emacs mode to edit files written in the OCaml programming language.

An Emacs mode to edit files written in the OCaml programming language.

38 questions
8
votes
3 answers

Ocaml - Emacs tuareg mode

I just started to use the tuareg mode in emacs for ocaml programming. So can someone tell me what are the main advantages of using it? Can someone suggest me any tutorial for that?
priyanka
  • 923
  • 1
  • 9
  • 20
7
votes
1 answer

Tuareg-mode and caml-mode

I'm currently using tuareg-mode but I would like to be able to use the functionality of caml-mode as well. In particular I want to be able to use type annotations interactively, and apparently this occurs with caml-types. I tried putting…
scry
  • 1,237
  • 12
  • 29
6
votes
2 answers

Ocaml: Error - this expression has type x but is used with type x

This is my error: Error: This expression has type nfa but is here used with type nfa What could possibly be happening to cause this? I'm using emacs tuareg, and loading evaluating files one by one. Sometimes this happens, and other times it…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
5
votes
3 answers

How can I specify a custom path to the annotation files in tuareg-mode emacs?

Is there anyway to specify the path to the annot files when using tuareg-mode in emacs? I am trying to find out the type for my functions and the mode complains with "not annotation file". My build structure is: lib obj *.o *.cmi *.cmx …
Calin
  • 1,471
  • 1
  • 15
  • 22
4
votes
1 answer

Convenient way to start a custom OCaml toplevel in Emacs with tuareg

If I start a custom toplevel in Emacs/tuareg with the tuareg-run-caml function, I need to give the path to the toplevel and the various -I options it requires to find the CMI files. This typing is tedious, is there a more convenient way to start a…
user40989
  • 228
  • 1
  • 6
4
votes
3 answers

How to download and install Emacs for OCaml?

I feel retarded asking this question, but I've been banging my head against the wall for a while now... This directory is linked to by the website for obtaining emacs: http://ftp.gnu.org/pub/gnu/emacs/. Which file do I want? I downloaded…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
3
votes
1 answer

Naive question on how to type-annotated my ocaml prog. in emacs

I heard we can annotate ocaml prog. by their types. An older thread in the forum suggested using ocaml mode of http://cristal.inria.fr/~remy/poly/emacs/index.html I have been using Tuareg mode, in which it suggested using "c-c c-t" to retrieve…
zell
  • 9,830
  • 10
  • 62
  • 115
3
votes
1 answer

Inputing data in OCaml toplevel runnin under Emacs

When interactively running the OCaml toplevel on Emacs (via the Tuareg mode), evaluation of expression which do input from the standard input channel does not finish. For instance, when I enter the following expression in the *ocaml-toplevel* buffer…
Romildo
  • 545
  • 9
  • 20
3
votes
1 answer

Tuareg-mode can't find ocaml?

I have tuareg-mode working on emacs. I downloaded ocaml 4.01.0 on my Mac OS and installed it. Maxs-MacBook-Pro:~ Max$ ocaml OCaml version 4.01.0 Maxs-MacBook-Pro:~ Max$ which ocamlrun /usr/local/bin/ocamlrun When in tuareg-mode, C-x C-b…
Silent
  • 67
  • 6
3
votes
1 answer

tuareg ocaml previous command

I am a new to ocaml. couldn't install rlwrap since I use a school computer. So I have to stick to emacs tuareg. My question is: How to bind an up arrow key to the previous command in tuareg?
heeh
  • 67
  • 2
  • 5
3
votes
1 answer

Why emacs Tuareg mode shows different color for functions in Ocaml?

Just want to know why Tuareg mode shows different colour for functions? for example, as shown below, function create_percolation and index_of show blue color and is_open is in brown color. Why??
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
2
votes
1 answer

I installed tuareg mode but it's not even showing in emacs

I tried to install the tuareg mode for emacs on Manjaro, but when i open emacs and create a test.ml file, the "tuareg" menu isn't even there and all the commands such as Ctrl c + Ctrl b are undefined, it's as if tuareg wasn't installed. In order to…
lairv
  • 109
  • 5
2
votes
1 answer

Highlight mll and mly files

I am rewriting my .emacs. At the moment, .ml files are well highlighted, whereas there is no mode for .mll or .mly files. Here is my .emacs, does anyone know how to amend it? Additionally, am I using tuareg-mode or ocp-indent?
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
2
votes
1 answer

Error in tuareg mode

I'm using tuareg mode to test small caml functions. But I've got some problems. The caml texts I write are not colored (tuareg mode seems here, the menu tuareg is there) caml toplevel is running but I can't evaluate phrase (C-x C-e) : the message…
ericD13
  • 21
  • 3
2
votes
2 answers

tuareg mode emacs ocaml not found

I am running emacs 24.3 on mac os x 10.9. I have installed the tuareg-mode for ocaml programming but am unable to compile using the command C-c C-b. On pressing the same, the minibuffer asks me about 'Caml toplevel to run: ocaml'. When I press enter…
user2239690
  • 81
  • 1
  • 10
1
2 3