
#12124: Ambiguous type variable: it's a red herring! -------------------------------------+------------------------------------- Reporter: drb226 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: 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): The case in comment:1 is behaving correctly. The type of `x` is generalised to `x :: forall a. a`. So the info from two uses of `x` in `(x, f x)` do not communicate with each other. Even `-XMonoLocalBinds` does not solve this, because with this flag GHC still generalises local bindings that have no free variables. I still need to look at the Description; but comment:1 looks fine to me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12124#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler