[Haskell-cafe] Language complexity & beginners (Was: New type of ($) operator in GHC 8.0 is problematic)

Takenobu Tani takenobu.hs at gmail.com
Thu Feb 11 12:19:03 UTC 2016


Hi,

I understood one more point. (I share here.)
The Prelude library document for ghc 8.0 is already well described for
beginners/newcomers.

 * The ($)'s signature of 8.0.1 is already simple (not include forall ...).
 * The Bool's kind of 8.0.1 is already represented with "TYPE Lifted"
(changed from '*').


ghc7.8.4 [1]:

  data Bool :: *
  foldr :: (a -> b -> b) -> b -> [a] -> b
  ($) :: (a -> b) -> a -> b


ghc7.10.4 [2]:

  data Bool :: *
  foldr :: (a -> b -> b) -> b -> t a -> b
  ($) :: (a -> b) -> a -> b


ghc8.0.1-rc2 [3]:

  data Bool :: TYPE Lifted
  foldr :: (a -> b -> b) -> b -> t a -> b
  ($) :: (a -> b) -> a -> b


[1]
https://downloads.haskell.org/~ghc/7.8.4/docs/html/libraries/base-4.7.0.2/Prelude.html
[2]
https://downloads.haskell.org/~ghc/latest/docs/html/libraries/base-4.8.2.0/Prelude.html
[3]
https://downloads.haskell.org/~ghc/8.0.1-rc2/docs/html/libraries/base-4.9.0.0/Prelude.html

Regards,
Takenobu


2016-02-08 19:08 GMT+09:00 Takenobu Tani <takenobu.hs at gmail.com>:

> Hi Richard and devs,
>
> What a wonderful (#11549) !
> This is a beautiful solution for beginners/newcomers.
> Beginners will not confuse and they can gradually go ahead.
>
> I extremely appreciate that you are continuously improving the ghc for us.
>
> Thank you very much,
> Takenobu
>
>
> 2016-02-07 0:17 GMT+09:00 Richard Eisenberg <eir at cis.upenn.edu>:
>
>> I have made a ticket #11549 (
>> https://ghc.haskell.org/trac/ghc/ticket/11549) requesting a
>> -fshow-runtime-rep flag (recalling that the name levity will soon be
>> outdated) as described in this thread. I will make sure this gets in for
>> the release of 8.0.
>>
>> Other points:
>>
>> - You're quite right that (.) could be generalized. But I'll wait for
>> someone to really want this.
>>
>> - I don't have a non-contrived example of the use of ($) with unlifted
>> types. It's quite possible that when adding the dirty runST hack, it was
>> observed that an unlifted type would be OK. At that point, the type of ($)
>> didn't need to become so elaborate. And now we're just trying not to change
>> old (but perhaps unrequested) behavior.
>>
>> - For the record, this debate is entirely unrelated to the runST
>> impredicativity hack. (Except, as noted above, perhaps in history.) That
>> hack remains, basically unchanged.
>>
>> - On Feb 6, 2016, at 9:55 AM, Roman Cheplyaka <roma at ro-che.info> wrote:
>> >
>> > I would call this a simplification rather than a lie.
>>
>> This is a very convincing argument.
>>
>> - Thanks, also, for the voice of support. What I love about the Haskell
>> community is that we can have an impassioned debate full of strong
>> opinions, and it all very rarely devolves into a proper flame war. All the
>> posts I've seen in this thread have been constructive and helpful. Thanks.
>>
>> Richard
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160211/89c9e5c0/attachment.html>


More information about the ghc-devs mailing list