
26 Jan
2006
26 Jan
'06
10:19 p.m.
On Thu, 2006-01-26 at 17:01 +0000, Olaf Chitil wrote:
Why are these patterns so hard to implement for Hat? Surely the Haskell report gives a translation into simple core Haskell. Well, Hat does not use this translation because it does not want to be an inefficient pattern matcher (leave that job to the compiler) but produce a trace of the Haskell program as it is written. However, both n+k and k patterns cause calls of functions ( (-), (==) etc) that Hat has to record in its trace.
Does it not have to do that for character and string patterns too? I suppose that the proposals to create a string class and have string/character constants overloaded by that class would cause similar problems for Hat. Duncan