On Tue, Mar 10, 2015 at 8:21 AM, Lyndon Maydwell <maydwell@gmail.com> wrote:
GHC 7.8.3 here.

Hmm, on second inspection I believe that the Bool reference is to the top-level expression, not the list items after all.

I don't seem to get any defaulting behaviour either when not using GHCi. This seems to indicate that the extended interactive type defaulting is coming into play:


I'd guess that this means that the () default is being used. -Wall seems to indicate that this is in-fact the case:


[Prelude] λ [] == []

<interactive>:2:4: Warning:
    Defaulting the following constraint(s) to type ‘()’
      (Eq t0) arising from a use of ‘==’
    In the expression: [] == []
    In an equation for ‘it’: it = [] == []
True


Hope this helps.


Thats better -- thanks Lyndon!

So after some fishing around I find the more pointed warning I am after is
-fwarn-type-defaults

The docs seem confusing though:

https://downloads.haskell.org/~ghc/7.4.1/docs/html/users_guide/options-sanity.html

Under -fwarn-type-defaults:
says

Have the compiler warn/inform you where in your source the Haskell defaulting mechanism for numeric types kicks in.

Wheres the numeric here?