Three problems here
1. Your program is ill-staged. Running the splice requires executing
'foo',
so 'foo' must be in another module.
2. GHC should report that as a staging error, but wasn't.
3. But even then it should not have crashed. Its should have reported
a linking error when trying to
This code produces True with ghc-5.04.2 and ghc-5.02.3. It works as I
would expect it to with ghc-4.08.1. Similarly, the derived instances of Ord
also don't work.
The only time that I've found in my limited expermentation that equality
returns false is:
Str a == Str ab
best,
leon
infixr