<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div style="" class="markdown-here-wrapper"
data-md-url="Thunderbird">
<p style="margin: 1.2em 0px ! important;">I’ve amended my
suggestion to say basically “this type is a slight lie, here’s a
flag/command to see the true type” – this way we aren’t scaring
people with implementation guts, merely letting them see the
guts for themselves and then think “I don’t care about this”
(which is, I think, exactly what should happen; the worst
scenario here is that the beginner falls into the “I’m an
advanced user, I need all features, I need to know everything,
so I’ll enable the flag” trap – which is why it’s important not
to call it “an advanced type” or mention “if you know what
you’re doing” or anything else like that).</p>
<p style="margin: 1.2em 0px ! important;">I don’t agree that
levity can be compared to Java’s “class” or “static” – not
because it’s harder to understand, but because it’s much less
widely used; I don’t feel that you need to know about levity in
order to be a good Haskeller. Also, unboxed types don’t imply
knowledge of levity – for instance, I’ve been successfully using
unboxed types for a while, but I only found out about the true
type of <code style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;">($)</code>
by complete accident (I think I queried the kind of <code style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;">-></code>
and then got curious about question marks). Of</p>
<p style="margin: 1.2em 0px ! important;">On 02/06/2016 03:27 AM,
Mihai Maruseac wrote:</p>
<p style="margin: 1.2em 0px ! important;"></p>
<div class="markdown-here-exclude">
<p></p>
<blockquote
cite="mid:CAOMsUMLwO29J0Ld-TeCDe=n9b6YWf91jXPhhBoXBjseKaLzzOw@mail.gmail.com"
type="cite">
<pre wrap="">On Fri, Feb 5, 2016 at 7:09 PM, Richard Eisenberg <a class="moz-txt-link-rfc2396E" href="mailto:eir@cis.upenn.edu"><eir@cis.upenn.edu></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Another great question that has come up is about Haddock output (Hackage). I
think Haddock needs to add a facility where library authors can include
specializations of an overly general type. This can be done in commentary,
but it's not as prominent. Such a new feature would address the ($) problem,
as ($) :: forall (a :: *) (b :: *). (a -> b) -> a -> b is a specialization
of its real type. It would also help a great deal with FTP-related
generalizations.
</pre>
</blockquote>
<pre wrap="">
This goes hand in hand with Artyom's suggestion of a warning in GHCi
after showing the simpler type.
I'm thinking of a flag which enables/disables printing the simplest
type with warning (in GHCi) or footnote (or otherwise, in Haddock). We
can have the default behavior of the flag be either printing the
simpler type + extra (warning/footnote) or printing the longer type
and include a reference in our learning materials that beginners and
people confused by the long, complex and real type, can use
--use-simpler-types flag.
</pre>
</blockquote>
<p></p>
</div>
<p style="margin: 1.2em 0px ! important;"></p>
<div
title="MDH:SSd2ZSBhbWVuZGVkIG15IHN1Z2dlc3Rpb24gdG8gc2F5IGJhc2ljYWxseSDigJx0aGlzIHR5cGUgaXMgYSBzbGlnaHQgbGllLCBoZXJlJ3MgYSBmbGFnL2NvbW1hbmQgdG8gc2VlIHRoZSB0cnVlIHR5
cGXigJ0g4oCTIHRoaXMgd2F5IHdlIGFyZW4ndCBzY2FyaW5nIHBlb3BsZSB3aXRoIGltcGxlbWVu
dGF0aW9uIGd1dHMsIG1lcmVseSBsZXR0aW5nIHRoZW0gc2VlIHRoZSBndXRzIGZvciB0aGVtc2Vs
dmVzIGFuZCB0aGVuIHRoaW5rIOKAnEkgZG9uJ3QgY2FyZSBhYm91dCB0aGlz4oCdICh3aGljaCBp
cywgSSB0aGluaywgZXhhY3RseSB3aGF0IHNob3VsZCBoYXBwZW47IHRoZSB3b3JzdCBzY2VuYXJp
byBoZXJlIGlzIHRoYXQgdGhlIGJlZ2lubmVyIGZhbGxzIGludG8gdGhlIOKAnEknbSBhbiBhZHZh
bmNlZCB1c2VyLCBJIG5lZWQgYWxsIGZlYXR1cmVzLCBJIG5lZWQgdG8ga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