
#14942: QuantifiedConstraints: GHC can't infer -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.5 Resolution: invalid | Keywords: | QuantifiedConstraints, wipT2893 Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => invalid Comment:
If we comment out together's type signature GHC cannot infer it back, shouldn't it be able to though?
No, that's by design. Currently GHC makes no attempt to ''infer'' a type with a quantified constraint. It's not impossible to do so -- even fairly easy -- but I worry that they'd then pop up unexpectedly in programs where there was simply a type error. For now, write a type signature; but re-raise it if that seems to be becoming onerous. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14942#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler