
#14835: QuantifiedConstraints: Can't deduce "(a, b)" from "a" and "b" -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.5 Resolution: | Keywords: | QuantifiedConstraints wipT2893 Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14833 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * related: => #14833 Comment: I think this is another manifestation of #14833. Here's an analogous removal of cruft for this ticket: {{{#!hs {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE QuantifiedConstraints #-} {-# LANGUAGE UndecidableInstances #-} module Bug where data Dict c where Dict :: c => Dict c class (a => b) => Implies a b instance (a => b) => Implies a b curryC1 :: ((a, b) => c) => Dict (Implies a (Implies b c)) curryC1 = Dict curryC2 :: Implies (a, b) c => Dict (Implies a (Implies b c)) curryC2 = Dict }}} Note that `curryC1` typechecks, but `curryC2` does not. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14835#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler