Simon P. Jones  wrote recently about that  ghc-6.12  takes in 
account the elliplis in  MkT {t1 = x, ..}  when reporting about 
unused bindings.

Now, here is the example: 

  module TT where
  data T = T {t1, t2 :: Int}

  f d = x  where
           T {t1 = x, ..} = d

ghc-6.12.2  warns about unused value of  t2.
And for                        f (T {t1 = x, ..}) = x,  
it does not warn about this.

Is this a bug?

I use
extensions: TypeSynonymInstances UndecidableInstances FlexibleContexts 
            FlexibleInstances MultiParamTypeClasses OverlappingInstances
            RecordWildCards NamedFieldPuns
ghc-options: -fno-warn-overlapping-patterns -fwarn-unused-binds 
             -fwarn-unused-matches -fwarn-unused-imports 
             -O0
, 
but the options can be simplified, of course.

Regards,
-----------------
Serge Mechveliani
mech...@botik.ru
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to