I havn't updated my blog for a few days - so I thought an update is in order.

Last week was a bit of a messy week research wise. I played around quite a bit with Template Haskell to discover that it is a really nice tool for source to source program transformations. I managed to write some simple refactorings using it in a few hours. I was surprised at how easy tree traversal is, I expected to write a lot of boilerplate code. The GHC AST is not multiple typed like the Programatica AST is, so I didn't need to use Strafunski.

Chris Ryder and I had a brief discussion about his work on porting HaRe to GHC, and it seems that a nice fix to get around the clumsy and slow type checker that Programatica provides by using the GHC type checker. This would require having a "Programatica land" and also a "GHC Land". Both "Lands" are kept in sync with the refactoring project and the GHC API is only called to get type information, and then the type information is mapped over the Programatica AST. A nice hack I would say. This means that HaRe would basically require GHC 6.5+ to be bolted onto the side, but I think that is a minor issue.

Using GHC in this way would allow for much faster type checking, and make my life easier. However its never simple. GHC has given me nothing but hassle on my Mac, and it has something to do with the evil mangler. Whenever I try to compile source code with the -fvia option set, non-deterministically the compiler fails. Interestingly, it always fails at the point of the evil mangler or the assembler. Something is not right with the system, and after endless reinstalls of Mac OS and memory tests that took all of the weekend I'm still no further forward. Wolfgang doesn't seem to know anything about this, and generally it seems I'm the only guy in the world that has seen this error. Perhaps it has something to do with 10.4... What I need is someone with an iBook G4 running Mac OS X 10.4 so they can check GHC for me.

Today I need to mark some Java assesments and then get my head down and do some research, the lastc few days have put me off course a bit.