[Haskell-cafe] Printing and Referential transparency excuse

Cristian Baboi cristian.baboi at gmail.com
Wed Dec 26 10:05:47 EST 2007


On Tue, 25 Dec 2007 13:49:21 +0200, Yitzchak Gale <gale at sefer.org> wrote:

> Hi Cristian,
>
> Cristian Baboi wrote:

>> ...I finished reading the Haskell Language Report and I noticed that the
>> class Show and Read are "toys".

> Actually, they are not toys at all. They are very useful, and they
> do their job well. But it looks like they are not the right tool
> for what you want to do.

The reasons I said they are toys, is because I've read in the language  
report that the parsing function for Read is slow and buggy, or at least  
that is what I understand.

Of course they are useful.


> What exactly are you trying to accomplish? Why would you
> want there to be instances like that?

I am trying to learn Haskell and I want to know its limitations and  
accomplishments.
I intend to use it in a few private projects.

> Are you thinking of program development and debugging?
> There are great tools for that.

No.

> Are you thinking of reflection? There are great tools for that
> also. But because of the power of Haskell's type system,
> you need that much less than in many other languages.

I am thinking of something like program synthesis.

The reason I want to build functions of type String -> (a -> b) is because  
I want to see how far I can get with "functions are first class citizens"  
in Haskell. I thought that if I read the function from an external source,  
there is no way the compiler could know what I'll read. I want to see if I  
can build a Haskell function at runtime, not a data structure that I can  
interpret.

If I cannot do that, I'll use it just for convenience.

P.S. I've found my answer to the question "why lamda abstractions are not  
allowed at the type level" in "A History of Haskell: Being Lazy With  
Class" in section 6.4.


More information about the Haskell-Cafe mailing list