[Haskell-cafe] Picking an architecture for a Haskell web app
Andrew Coppin
andrewcoppin at btinternet.com
Thu May 10 14:24:51 EDT 2007
>> > Also remember that evaluating an expression in Haskell is _really_
>> > hard!
>>
>> Really? Looks pretty damn simple to me...
>
> In that case I throw down the challenge of writing an interpetter that
> takes a Haskell syntax tree and evaluates it :)
I'm currently in the process of attempting to write such a thing...
> What is the value of show [] ?
That is indeed a difficult point. Since I want an interpreter so I can
step through the code interactively, I was just going to make the
interpreter *ask* me which implementation to call...
>> Oh, yeah, well, definitely the hardest part is *parsing* Haskell. In
>> particular, the fact that layout exists makes this problem essentually
>> unsolvable.
>
> I'd say the type checking was much harder. The problem of desugaring
> is broad, but in most cases isn't that complex.
I did wonder how in the name of God the Haskell type inference thingy
actually works. I mean, clearly it *should* be possible to infer the
type - I can do it - but how on earth do you implement such a thing on a
computer?
And then I read The Fun of Programming... and I found out. ;-)
On the other hand, parsing Haskell input is intractably hard. Whitespace
actually matters, which makes the program to parse Haskell horrendusly
complex. Several times I've been forced to give up due to the sheer
complexity of it all.
More information about the Haskell-Cafe
mailing list