[Haskell-cafe] More on the random idea

Andrew Coppin andrewcoppin at btinternet.com
Sat May 26 16:05:23 EDT 2007


Stefan O'Rear wrote:
> Actually, there exists no interpreter for Haskell.  Period.
>   
> Haskell has never been implemented.  Every implementation has a large
> collection of corner cases that aren't correctly parsed; these can be
> recognized as the wontfix bugs. 
>   
Erm... I'm having a "there is no spoon" moment here... Feeling quite 
lost now...
>> OTOH, GHCi just takes an expression, parses it and interprets it. This 
>>     
>
> Haha, no.
>
> GHCi takes an expression, parses it, wraps it in module Main { main =
> print (expr) }, type checks it, transforms it to Core, optimizes,
> transforms to STG, optimizes, transforms to object code for a bytecode
> machine, links it, and emulates the result.  Three times, since it
> needs to try each of expr, expr >>= print, and print expr.
>
> Hugs is also a full compiler, but for some dumb reason doesn't support
> saving the object code to disk, so you have to recompile everything
> each time. 
>   

I once write a trivial little Tcl script that could parse and execute a 
biggish subset of Haskell. Given that there are minds out there awesom 
enough to write an efficient Haskell compiler, you'd think a naive 
little interpreter for running small expressions wouldn't post much of a 
problem...

>> appears to be a *much* more lightweight approach. I have had some 
>>     
>
> Not at all.  GHCi seems much faster because GHC's nontrivial startup
> overhead is amortized over the entire run. 
>   

I...see... I think... hmm...

>> Whatever... I'd just like to see an online way to run Haskell, and since 
>> the Lambdabot webpage still shows no sign of working...
>>     
>
> That's my fault - I designed a much simpler configuration interface
> for lambdabot, but nobody has been motivated to un-bitrot GOA yet. 
>   

Um... what's GOA?



More information about the Haskell-Cafe mailing list