
#15589: Always promoting metavariables during type inference may be wrong -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Here's another idea: if a type signature has any free, lexically-scoped type variables, then treat it like a ''partial'' type signature. That is, used to guide and constrain type inference, but NOT used as the single canonical specification of the type of `x`, nor used to support polymorphic recursion. That's still annoying: we might want polymorphic recursion, and if so how would we get it. But the point about having free unification variables is that we don't really know the type at all, yet. And that's what partial type signatures are all about. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15589#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler