
#15334: (forall x. c x, forall x. d x) is not equivalent to forall x. (c x, d x) -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler (Type | Version: 8.5 checker) | Keywords: Resolution: | QuantifiedConstraints Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): When I write `foo :: (C a, D a b) => a -> b -> a`, I'm not thinking that my function expects a given tuple. I'm expecting a given `C a` and `D a b`. The parentheses-and-comma are just concrete syntax. I know it's not implemented that way, but that's the programmer's view. Along similar lines, I would expect `forall a b. (C a, D a b)` to be shorthand for `forall a b. C a` and `forall a b. D a b`. There's really no other sensible interpretation (as you point out), so let's just add this as a special case, just as `(C a, D a b) => ...` is a special syntax for `C a => D a b => ...`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15334#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler