At 14:15 +0000 98/10/24, Simon Marlow wrote:
>Simon Peyton-Jones <[EMAIL PROTECTED]> writes:
>
>> Consider the function
>>
>>      t :: T a => T a -> T a
>>
>> I think that it's far from clear what each of the T's mean!
>> Worse, in Haskell 2 we'll also have
>>
>>      t :: T T => T a -> T a
>>
>> In (T T) one is class and the other is a type constructor.
>
>I'm not convinced by the argument "this allows you to write obfuscated
>Haskell".  After all, Haskell is already a wonderful language for
>writing obfuscated code; eg. what does the following definition mean
>
>       f f = f
>
>is it a static error (re-use of 'f'), a type error, or a definition of
>the identity function?  (it's the latter).
>
>Here's to cleaning up the language, and to more exciting obfuscated
>Haskell competitions!

  Haskell translates  f f = f  into  f := f |-> f; on the right hand side
"f" is a bound variable, on the left hand side "f" is a name. Suppose I
inidicate variables with a slash, then the formula would read
    f := \f |-> \f
or f(\f) := \f.

  So Haskell allows different logical entities have the same name dependent
on the context, which causes the confusion.

  Now, I think the problems you have with the original discussion is that
you fail to properly define the underlying semantics, specifically, the
general principles on which it depends.

  Hans Aberg
                  * Email: Hans Aberg <mailto:[EMAIL PROTECTED]>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>



Reply via email to