Currently, strategies are tested on the original AST, but often you like to run them on the analysed AST. To distinguish both use cases, I would like something like this
test addition [[a= [[3 + 3 ]];]] run type-of to Int() vs. test addition [[a= [[3 + 3 ]];]] analyze and run type-of to Int()

Submitted by Guido Wachsmuth on 12 January 2012 at 15:24

On 2 February 2012 at 16:45 Lennart Kats commented:

We could also use the meta-data in the esv to help here. Normally, only builders that have a (source) annotation in the esv work on the source AST.

That said, it seems that if you use run instead of build, it uses the source AST instead of the analyzed AST. (And since you’re calling a builder you should probably be calling build anyway.) It was supposed to use the analyzed AST by default. That should be fixed in r24193.


On 18 October 2012 at 02:25 Guido Wachsmuth commented:

build does not help here, because type-of is a simple strategy, not a builder. It does not match the builder-specific tuple. It simply maps desugared expressions to their types.


On 9 November 2013 at 00:11 Guido Wachsmuth tagged lab

On 9 November 2013 at 00:12 Guido Wachsmuth tagged @gohla


On 11 November 2013 at 13:08 Gabriël Konat closed this issue.

Log in to post comments