#3700: Being instance of Monoid is not checked
------------------------+---------------------------------------------------
    Reporter:  boris    |       Owner:                         
        Type:  bug      |      Status:  new                    
    Priority:  normal   |   Component:  Compiler (Type checker)
     Version:  6.10.3   |    Keywords:  Monoid, Writer         
          Os:  Windows  |    Testcase:                         
Architecture:  x86      |     Failure:  Other                  
------------------------+---------------------------------------------------
 It is possible pass not only instances of Monoid to tell function and load
 the file with GHCi. GHCi shows type f :: (MonadWriter ((a -> b) -> [a] ->
 [b]) m) => t -> m ()
 {{{
 f _ = tell map
 }}}
 However, if code is
 {{{
 f = tell map
 }}}
 GHCi shows type error(no instance) as expected.

 It seems very strange that type correctness depends on number of
 parameters for function that is not used anywhere.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3700>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to