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
Transforming of ASTs and polymorphic variants
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-25 (04:56)
From: Joel Reymont <joelr1@g...>
Subject: Re: Transforming of ASTs and polymorphic variants
I also tend to write "macros" to lessen the pain of typing up the  
ASTs in my unit tests.

I may have in both and (contrived example)

type expr = VarIdent of string

I then end up with duplicate let id x = VarIdent x in both and since A.expr and B.expr are of a different type. It would be  
great if I could write id once and have it work for both A.expr and  

	Thanks, Joel