Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 a.ml and b.ml (contrived example)

type expr = VarIdent of string

I then end up with duplicate let id x = VarIdent x in both a.ml and  
b.ml 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  
B.expr.

	Thanks, Joel

--
http://wagerlabs.com/