[GHC] #6022: GHC infers over-general types

GHC cvs-ghc at haskell.org
Wed Oct 10 20:53:19 CEST 2012


#6022: GHC infers over-general types
---------------------------------+------------------------------------------
    Reporter:  simonpj           |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  high              |   Milestone:  7.6.2           
   Component:  Compiler          |     Version:  7.4.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by carter):

 fixed the formatting

 Prelude> let g x = (+) x $ head
 Prelude> :t g

  g :: Num ([a] -> a) => ([a] -> a) -> [a] -> a

 Prelude> let h x y = x + head y

 Prelude> :t h

 h : Num a => a -> [a] -> a

 Prelude> let q x = (x +) . head

 Prelude> :t q

  q : Num c => c -> [c] -> c

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6022#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list