[Haskell-cafe] Investigating single-letter type variables

Jeffrey Brown jeffbrown.the at gmail.com
Fri Aug 11 00:47:14 UTC 2017


> it became harder to tell types from value-level expressions at a glance

Font differences seem like a more natural way to distinguish those.

> Do you prefer this?
>
> id :: domain ~ codomain => domain -> codomain ...

Lol no.

Maybe a good solution would be, rather than longer names, some automated
way for a user to ask whether a type variable like 'a' carries any
semantics, or is truly free to be anything.

If I'm learning a library from the top down, it's not (as far as I can
remember) a problem. But sometimes one library uses a single function
buried deep in another library. In those situations, the current status-quo
recipe, "just flail around (reading documentation or manually unifying
types) until you get it," seems improvable.

But if y'all gurus don't think it's a big deal, I'll take your word for it,
and wait for those flailings to become instinctual.

On Thu, Aug 10, 2017 at 4:08 PM, Albert Y. C. Lai <trebla at vex.net> wrote:

> On 2017-08-10 06:29 PM, Jeffrey Brown wrote:
>
>> Haskellers tend to use uninformative single-letter type variables. A
>>
>
> Do you prefer this?
>
> id :: domain ~ codomain => domain -> codomain
> id argument = return_value
>   where
>     return_value = argument
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
>



-- 
Jeff Brown | Jeffrey Benjamin Brown
Website <https://msu.edu/~brown202/>   |   Facebook
<https://www.facebook.com/mejeff.younotjeff>   |   LinkedIn
<https://www.linkedin.com/in/jeffreybenjaminbrown>(spammy, so I often miss
messages here)   |   Github <https://github.com/jeffreybenjaminbrown>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170810/ee1078ec/attachment.html>


More information about the Haskell-Cafe mailing list