Version française
Home     About     Download     Resources     Contact us    
Browse thread
Revised syntax error messages ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Teller <David.Teller@u...>
Subject: Revised syntax error messages ?
   Hi everyone,
 At the moment, when using the revised syntax, the toplevel prints
typing error messages with the revised syntax but ocamlc seems to print
them with the original syntax, which may be confusing.

For instance, in the toplevel :

# match [] with [ Some _ -> 1 | None -> 2 ];
                       ^
This pattern matches values of type option 'a
but is here used to match values of type list 'b


With ocamlc :

yoric@Blefuscu:/tmp$ ocamlc -pp camlp4rf test.ml 
File "test.ml", line 1, characters 21-22:
This pattern matches values of type 'a option
but is here used to match values of type 'b list

This may be quite confusing for beginners. Is there a way to get the
revised syntax error messages with ocamlc ?

Thanks,
 David

-- 
David Teller
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations.