Browse thread
[Caml-list] [Q] explicit typing again
-
fis@w...
- Jacques Garrigue
- Remi Vanicat
- Martin Jambon
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Remi Vanicat <remi.vanicat@l...> |
| Subject: | Re: [Caml-list] [Q] explicit typing again |
fis@wiwi.hu-berlin.de writes: > hi, > > sorry, but i am really enthusiastic about explicit typing. i will > probably start to annotate expressions like "3" soon... (-: > > could anybody tell me how i get this one straight? > > # let (a: int, b) = (1, 3) in a;; it is : let ((a:int),b) = (1, 3) in a;; > # let (a, b) : int * int = (1, 3) in a;; there it is : let ((a, b) : int * int) = (1, 3) in a;; In fact, often it is enough to add some parenthesis around the "value : type" to make the parser happy. -- Rémi Vanicat ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners