On 8/17/07, Kim-Ee Yeoh <a.biurvOir4@asuhan.com> wrote:


Lennart Augustsson wrote:
>
> And as a previous poster showed, ghc does concatenate strings.
>

And Haskell (as in the current language definition) does not.
I was talking about Haskell.

Haskell says nothing about compile time or run time in the language definition.  Nor does it say exactly when things are evaluated.  Even the tag line for Haskell says "non-strict" rather than lazy.
So Haskell semantics allows many evaluation strategies, and evaluating terminating constant expression at compile time is certainly one of them.  You don't have to, but it's permissible.

  -- Lennart