[Haskell-cafe] [] == []
Lyndon Maydwell
maydwell at gmail.com
Tue Mar 10 02:37:32 UTC 2015
This looks like a great opportunity to try out the new holes functionality:
[Prelude] λ [] == _what
<interactive>:3:7:
Found hole ‘_what’ with type: [t0]
Where: ‘t0’ is an ambiguous type variable
Relevant bindings include it :: Bool (bound at <interactive>:3:1)
In the second argument of ‘(==)’, namely ‘_what’
In the expression: [] == _what
In an equation for ‘it’: it = [] == _what
Looks like it defaults to [Bool]!
Correct me if I'm wrong :)
- Lyndon
On Tue, Mar 10, 2015 at 1:33 PM, Rustom Mody <rustompmody at gmail.com> wrote:
> My impression is that earlier
> [] == []
> used to give a type error. Now it gives True.
>
> So
> 1. Which instance of == is being used?
> 2. Is there some option controlling this behavior?
>
> _______________________________________________
> 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/haskell-cafe/attachments/20150310/d6a9b48c/attachment.html>
More information about the Haskell-Cafe
mailing list