Open roboguy13 opened 9 years ago
The old shell had the command diff
for this. If you gave it two AST ids (the number printed in the hermit prompt... hermit<30> means you are transforming AST id 30), it would show the diff between the pretty printed output. If you want this always, you could use set-pp-diffonly True
.
It's not the greatest diff (it diffs by line), but I used it quite a bit. I have an idea for using the fold machinery to do semantic diff, but haven't gotten around to it yet.
We have a plan here. Because we (will) return the HDoc
by default to the Shell, there can be a function
diff :: HDoc -> HDoc -> IO HDoc
This might be quite a bit more trouble than it would be worth (implementation-wise), but it would be nice if you could turn on an option to highlight the difference between the results of each consecutive pair of steps in a script:
This would also work together with #30 well, if we decide to implement that.