Quantcast

Deprecate Foldable for Either

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
76 messages Options
1234
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Henrik Nilsson-2
Hi,

Andrew Martin wrote:

 > Aside from the technical reasons, which have already been discussed
 > and decided, confused students dictating language and library design
 > has never worked out well.

Neither arguing for or against here, but let it just be clear that
it is *not* just students who have been bitten by this particular
change, but also very experienced Haskellers. And they don't like it
a bit.

Besides, is there *any* concrete evidence language and library design
necessarily must be confusing to students in order to work for real
applications?

I'd say there is plenty of evidence to the contrary. For example,
what effectively is no more than Haskell 98 is used very successfully
within Standard Chartered bank, which probably has the largest
team of Haskell programmers in the world. And they made a very
deliberate, carefully considered choice to keep their in-house
version of Haskell simple.

Now, I am obviously not arguing to move back to Haskell 98.
But I think this example very convincingly demonstrates that
conceptual simplicity can go a very long way indeed, and that lots of
features and extensions that are seen as very important by some,
in the bigger picture perhaps were not so essential after all.
And maybe the cost imposed on the rest of the community outweighs
their benefit.

Best,

/Henrik





This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it.

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

non-generic Data.List (Was: Deprecate Foldable for Either)

Henning Thielemann
In reply to this post by Andreas Abel

On Thu, 2 Mar 2017, Andreas Abel wrote:

> We could have a module
>
>   Data.List.ReallyJustListsAndNotSomeThingMoreGeneric
>
> which implements concat and friends just for lists and could be imported
> if one wants to have the list operations.  Currently,
>
>   import qualified Data.List as List
>
> does not give on the list operations as e.g.
>
>   List.concat
>
> but the generic ones.


I have compiled the package prelude-compat for that purpose:
    http://hackage.haskell.org/package/prelude-compat
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Henning Thielemann
In reply to this post by Ivan Lazar Miljenovic

On Fri, 3 Mar 2017, Ivan Lazar Miljenovic wrote:

> On 3 March 2017 at 06:28, David Feuer <[hidden email]> wrote:
>> Yes. That is an excellent plan. I'd love to call it Data.List, but others
>> will disagree.
>
> Same here.
>
> I wasn't that happy with the FTP proposal when it first came up due to
> potential confusions (primarily due to naming conventions like
> "length"), but now that it's done we shouldn't go back.

We should have at least compiler warnings for those who care.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Carter Schonwald
for what?

lets just have a learners / grumpy people prelude

On Fri, Mar 17, 2017 at 8:31 AM, Henning Thielemann <[hidden email]> wrote:

On Fri, 3 Mar 2017, Ivan Lazar Miljenovic wrote:

On 3 March 2017 at 06:28, David Feuer <[hidden email]> wrote:
Yes. That is an excellent plan. I'd love to call it Data.List, but others
will disagree.

Same here.

I wasn't that happy with the FTP proposal when it first came up due to
potential confusions (primarily due to naming conventions like
"length"), but now that it's done we shouldn't go back.

We should have at least compiler warnings for those who care.

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Francesco Ariis
On Sat, Mar 18, 2017 at 03:21:34PM -0400, Carter Schonwald wrote:
> for what?
>
> lets just have a learners / grumpy people prelude

This has been a respectful thread from both sides, why mar it
with snarky remarks?
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Henning Thielemann
In reply to this post by Carter Schonwald

On Sat, 18 Mar 2017, Carter Schonwald wrote:

> for what?

A warning if someone e.g. calls 'length (a,b)', or more generally, if
certain instances are used.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

amindfv
In reply to this post by Carter Schonwald
The issue is that if a "grumpy person" imports any library which uses the Prelude (I have a feeling they might), then under the open world assumption they will get the instances that to them are broken.

If we can get a warning then those of us who find the instances dangerous might be more willing to live and let live.

Tom


El 18 mar 2017, a las 14:21, Carter Schonwald <[hidden email]> escribió:

for what?

lets just have a learners / grumpy people prelude

On Fri, Mar 17, 2017 at 8:31 AM, Henning Thielemann <[hidden email]> wrote:

On Fri, 3 Mar 2017, Ivan Lazar Miljenovic wrote:

On 3 March 2017 at 06:28, David Feuer <[hidden email]> wrote:
Yes. That is an excellent plan. I'd love to call it Data.List, but others
will disagree.

Same here.

I wasn't that happy with the FTP proposal when it first came up due to
potential confusions (primarily due to naming conventions like
"length"), but now that it's done we shouldn't go back.

We should have at least compiler warnings for those who care.

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Lana Black
In reply to this post by Henning Thielemann
On 18/03/17 19:49, Henning Thielemann wrote:

>
> On Sat, 18 Mar 2017, Carter Schonwald wrote:
>
>> for what?
>
> A warning if someone e.g. calls 'length (a,b)', or more generally, if
> certain instances are used.
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

Please no. Many of us like our code Wall-clean while still being able to
write polymorphic functions. Adding more warnings that are often
triggered by correct code (redundant constraints, anyone?) only leads to
more headache.

You could make that an hlint rule on the other hand.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Henning Thielemann

On Sat, 18 Mar 2017, Lana Black wrote:

> On 18/03/17 19:49, Henning Thielemann wrote:
>>
>> On Sat, 18 Mar 2017, Carter Schonwald wrote:
>>
>>> for what?
>>
>> A warning if someone e.g. calls 'length (a,b)', or more generally, if
>> certain instances are used.
>
> Please no. Many of us like our code Wall-clean while still being able to
> write polymorphic functions.

Whether the warning is enabled by Wall is a different question.
Though I think it should.

https://ghc.haskell.org/trac/ghc/ticket/11796
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

David Feuer
I'm +1 on offering the warning and very very -1 on including it in -Wall.

On Mar 18, 2017 6:19 PM, "Henning Thielemann" <[hidden email]> wrote:

On Sat, 18 Mar 2017, Lana Black wrote:

On 18/03/17 19:49, Henning Thielemann wrote:

On Sat, 18 Mar 2017, Carter Schonwald wrote:

for what?

A warning if someone e.g. calls 'length (a,b)', or more generally, if
certain instances are used.

Please no. Many of us like our code Wall-clean while still being able to
write polymorphic functions.

Whether the warning is enabled by Wall is a different question.
Though I think it should.

https://ghc.haskell.org/trac/ghc/ticket/11796
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

amindfv
In reply to this post by Lana Black


> El 18 mar 2017, a las 16:01, Lana Black <[hidden email]> escribió:
>
>> On 18/03/17 19:49, Henning Thielemann wrote:
>>
>>> On Sat, 18 Mar 2017, Carter Schonwald wrote:
>>>
>>> for what?
>>
>> A warning if someone e.g. calls 'length (a,b)', or more generally, if
>> certain instances are used.
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> Please no. Many of us like our code Wall-clean while still being able to
> write polymorphic functions. Adding more warnings that are often
> triggered by correct code (redundant constraints, anyone?) only leads to
> more headache.
>
> You could make that an hlint rule on the other hand.

Can it be a hlint rule? It seems quite difficult to predict that "length" will not ever be passed e.g. a 2-tuple in the general case, within hlint.

I would also favor a warning, and happily have -Wall not include it (though I'd prefer inclusion).

Tom


> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Adam Bergmark-2
I'm on the fence about the instance existing. I'm +1 for a warning, and thus would be +1 on keeping the instance. +1 on making the warning opt-in and +1 keeping it out of -Wall.



On Sun, 19 Mar 2017 at 00:51 <[hidden email]> wrote:


> El 18 mar 2017, a las 16:01, Lana Black <[hidden email]> escribió:
>
>> On 18/03/17 19:49, Henning Thielemann wrote:
>>
>>> On Sat, 18 Mar 2017, Carter Schonwald wrote:
>>>
>>> for what?
>>
>> A warning if someone e.g. calls 'length (a,b)', or more generally, if
>> certain instances are used.
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> Please no. Many of us like our code Wall-clean while still being able to
> write polymorphic functions. Adding more warnings that are often
> triggered by correct code (redundant constraints, anyone?) only leads to
> more headache.
>
> You could make that an hlint rule on the other hand.

Can it be a hlint rule? It seems quite difficult to predict that "length" will not ever be passed e.g. a 2-tuple in the general case, within hlint.

I would also favor a warning, and happily have -Wall not include it (though I'd prefer inclusion).

Tom


> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Tony Morris-4
In reply to this post by David Feuer

I will fork the compiler before I endure that degree of failure.


On 19/03/17 08:21, David Feuer wrote:
I'm +1 on offering the warning and very very -1 on including it in -Wall.

On Mar 18, 2017 6:19 PM, "Henning Thielemann" <[hidden email]> wrote:

On Sat, 18 Mar 2017, Lana Black wrote:

On 18/03/17 19:49, Henning Thielemann wrote:

On Sat, 18 Mar 2017, Carter Schonwald wrote:

for what?

A warning if someone e.g. calls 'length (a,b)', or more generally, if
certain instances are used.

Please no. Many of us like our code Wall-clean while still being able to
write polymorphic functions.

Whether the warning is enabled by Wall is a different question.
Though I think it should.

https://ghc.haskell.org/trac/ghc/ticket/11796
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Henning Thielemann

On Sun, 19 Mar 2017, Tony Morris wrote:

> I will fork the compiler before I endure that degree of failure.

That's a reasonable approach. If you would have forked the compiler in
order to implement the FTP and all the Foldable tuple instances only in
the fork then we would not need the warnings, at all.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Tony Morris-4
I already implemented all of that over 10 years ago. All I need is
NoImplicitPrelude and I can fly under the radar, with the outcome of
not-really-debates having nil practical effect.

I'm just pointing to the approaching threshold in nose-down trim. I've
code to write now. Expedited bug out.


On 19/03/17 20:09, Henning Thielemann wrote:
>
> On Sun, 19 Mar 2017, Tony Morris wrote:
>
>> I will fork the compiler before I endure that degree of failure.
>
> That's a reasonable approach. If you would have forked the compiler in
> order to implement the FTP and all the Foldable tuple instances only
> in the fork then we would not need the warnings, at all.



_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

amindfv
In reply to this post by Adam Bergmark-2
Is there a clear way to implement this instance warning? I.e. given:

f x = 2 * length x

Can we guarantee at compile time that "f" will never be passed a 2-tuple?

Tom

El 18 mar 2017, a las 20:04, Adam Bergmark <[hidden email]> escribió:

I'm on the fence about the instance existing. I'm +1 for a warning, and thus would be +1 on keeping the instance. +1 on making the warning opt-in and +1 keeping it out of -Wall.



On Sun, 19 Mar 2017 at 00:51 <[hidden email]> wrote:


> El 18 mar 2017, a las 16:01, Lana Black <[hidden email]> escribió:
>
>> On 18/03/17 19:49, Henning Thielemann wrote:
>>
>>> On Sat, 18 Mar 2017, Carter Schonwald wrote:
>>>
>>> for what?
>>
>> A warning if someone e.g. calls 'length (a,b)', or more generally, if
>> certain instances are used.
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> Please no. Many of us like our code Wall-clean while still being able to
> write polymorphic functions. Adding more warnings that are often
> triggered by correct code (redundant constraints, anyone?) only leads to
> more headache.
>
> You could make that an hlint rule on the other hand.

Can it be a hlint rule? It seems quite difficult to predict that "length" will not ever be passed e.g. a 2-tuple in the general case, within hlint.

I would also favor a warning, and happily have -Wall not include it (though I'd prefer inclusion).

Tom


> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Adam Bergmark-2
This would have to be determined and triggered at the use site of `f' since `f :: Foldable t => t a -> Int'. As long as you stay generic the user of your function will decide whether he wants the warning. If you choose to specialize your function to a 2-tuple you would get the warning.

Adam


On Sun, 19 Mar 2017 at 17:14 <[hidden email]> wrote:
Is there a clear way to implement this instance warning? I.e. given:

f x = 2 * length x

Can we guarantee at compile time that "f" will never be passed a 2-tuple?

Tom

El 18 mar 2017, a las 20:04, Adam Bergmark <[hidden email]> escribió:

I'm on the fence about the instance existing. I'm +1 for a warning, and thus would be +1 on keeping the instance. +1 on making the warning opt-in and +1 keeping it out of -Wall.



On Sun, 19 Mar 2017 at 00:51 <[hidden email]> wrote:


> El 18 mar 2017, a las 16:01, Lana Black <[hidden email]> escribió:
>
>> On 18/03/17 19:49, Henning Thielemann wrote:
>>
>>> On Sat, 18 Mar 2017, Carter Schonwald wrote:
>>>
>>> for what?
>>
>> A warning if someone e.g. calls 'length (a,b)', or more generally, if
>> certain instances are used.
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> Please no. Many of us like our code Wall-clean while still being able to
> write polymorphic functions. Adding more warnings that are often
> triggered by correct code (redundant constraints, anyone?) only leads to
> more headache.
>
> You could make that an hlint rule on the other hand.

Can it be a hlint rule? It seems quite difficult to predict that "length" will not ever be passed e.g. a 2-tuple in the general case, within hlint.

I would also favor a warning, and happily have -Wall not include it (though I'd prefer inclusion).

Tom


> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

warn about dangerous instances (Was: Deprecate Foldable for Either)

Henning Thielemann
In reply to this post by amindfv

On Sun, 19 Mar 2017, [hidden email] wrote:

> Is there a clear way to implement this instance warning? I.e. given:
>
> f x = 2 * length x
>
> Can we guarantee at compile time that "f" will never be passed a 2-tuple?

I gave an idea in the ticket:
    https://ghc.haskell.org/trac/ghc/ticket/11796

Defining f this way would be ok if x is polymorphic. The warning would
only arise if f is applied to a pair.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

Tony Morris
In reply to this post by amindfv
That you can't should be a hint that length for ((,) a) is very definitely 1.

Simply, use a different function, not length, which is well-defined for ((,) a) and other instances.

On Mon, Mar 20, 2017 at 3:15 AM, <[hidden email]> wrote:
Is there a clear way to implement this instance warning? I.e. given:

f x = 2 * length x

Can we guarantee at compile time that "f" will never be passed a 2-tuple?

Tom

El 18 mar 2017, a las 20:04, Adam Bergmark <[hidden email]> escribió:

I'm on the fence about the instance existing. I'm +1 for a warning, and thus would be +1 on keeping the instance. +1 on making the warning opt-in and +1 keeping it out of -Wall.



On Sun, 19 Mar 2017 at 00:51 <[hidden email]> wrote:


> El 18 mar 2017, a las 16:01, Lana Black <[hidden email]> escribió:
>
>> On 18/03/17 19:49, Henning Thielemann wrote:
>>
>>> On Sat, 18 Mar 2017, Carter Schonwald wrote:
>>>
>>> for what?
>>
>> A warning if someone e.g. calls 'length (a,b)', or more generally, if
>> certain instances are used.
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> Please no. Many of us like our code Wall-clean while still being able to
> write polymorphic functions. Adding more warnings that are often
> triggered by correct code (redundant constraints, anyone?) only leads to
> more headache.
>
> You could make that an hlint rule on the other hand.

Can it be a hlint rule? It seems quite difficult to predict that "length" will not ever be passed e.g. a 2-tuple in the general case, within hlint.

I would also favor a warning, and happily have -Wall not include it (though I'd prefer inclusion).

Tom


> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries



_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deprecate Foldable for Either

amindfv


El 19 mar 2017, a las 17:19, Tony Morris <[hidden email]> escribió:

That you can't should be a hint that length for ((,) a) is very definitely 1.


To be frank, this seems like a non-sequitur. Many of us find e.g.:

length (_, _) = 1
maximum (_, b) = b

to be dangerous instances. We don't want to accidentally call them. We'd like a way to opt out or warn on use.

The inability to opt out or be warned does not seem to me to be an argument that the above instances are good instances.

Feel free to clarify if I haven't understood your point.

Thanks!
Tom


Simply, use a different function, not length, which is well-defined for ((,) a) and other instances.

On Mon, Mar 20, 2017 at 3:15 AM, <[hidden email]> wrote:
Is there a clear way to implement this instance warning? I.e. given:

f x = 2 * length x

Can we guarantee at compile time that "f" will never be passed a 2-tuple?

Tom

El 18 mar 2017, a las 20:04, Adam Bergmark <[hidden email]> escribió:

I'm on the fence about the instance existing. I'm +1 for a warning, and thus would be +1 on keeping the instance. +1 on making the warning opt-in and +1 keeping it out of -Wall.



On Sun, 19 Mar 2017 at 00:51 <[hidden email]> wrote:


> El 18 mar 2017, a las 16:01, Lana Black <[hidden email]> escribió:
>
>> On 18/03/17 19:49, Henning Thielemann wrote:
>>
>>> On Sat, 18 Mar 2017, Carter Schonwald wrote:
>>>
>>> for what?
>>
>> A warning if someone e.g. calls 'length (a,b)', or more generally, if
>> certain instances are used.
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> Please no. Many of us like our code Wall-clean while still being able to
> write polymorphic functions. Adding more warnings that are often
> triggered by correct code (redundant constraints, anyone?) only leads to
> more headache.
>
> You could make that an hlint rule on the other hand.

Can it be a hlint rule? It seems quite difficult to predict that "length" will not ever be passed e.g. a 2-tuple in the general case, within hlint.

I would also favor a warning, and happily have -Wall not include it (though I'd prefer inclusion).

Tom


> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries



_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
1234
Loading...