Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] possible to define a type where = is forbidden ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-10-10 (13:42)
From: yoann padioleau <padator@w...>
Subject: Re: [Caml-list] possible to define a type where = is forbidden ?

> On Oct 10, 2005, at 2:32 PM, yoann padioleau wrote:
> > I am making a program analysis tool  and in my AST I had previously  
> > tokens represented as strings,
> > but now I want also to associate the line numbers of those strings.
> I like to suggest a different technique that does not require to change  
> the representation of all branches in an AST. You can find it in an  
> earlier posting here:
> f81c8063ed4878e06f1ddd8010256050.en.html

Interesting technique :)  but I think that it would not solve my problem. 

To be more precise my program analysis tool  try to compute "diff" between differents AST.
So we love to use pattern-patching and to (ab)use the polymorphic  =  to compare stuff.

I don't see how your ExprAt technique will make this easier (not to mention that it also makes 
the pattern matching ugly because I would have to wrap every  expression  with his ExprAt  because I want
that the resultting  Ast_diff  contain also line number.