
#11264: Previously compiling example does not compile -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | typecheck/should_compile/ClassOperator Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * testcase: => typecheck/should_compile/ClassOperator * failure: None/Unknown => GHC rejects valid program * milestone: => 8.0.1 * priority: normal => high Old description: New description: The example in the testcase introduced in Phab:D1667 currently fails with, {{{ ClassOperator.hs:12:3: error: • Could not deduce (a ><> b0) from the context: a ><> b bound by the type signature for: (**>) :: (a ><> b) => a -> a -> () at ClassOperator.hs:12:3-44 The type variable ‘b0’ is ambiguous • In the ambiguity check for ‘**>’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes When checking the class method: (**>) :: forall a b. (a ><> b) => a -> a -> () In the class declaration for ‘><>’ ClassOperator.hs:12:3: error: • Could not deduce (a ><> b0) from the context: a ><> b bound by the type signature for: (**<) :: (a ><> b) => a -> a -> () at ClassOperator.hs:12:3-44 The type variable ‘b0’ is ambiguous • In the ambiguity check for ‘**<’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes When checking the class method: (**<) :: forall a b. (a ><> b) => a -> a -> () In the class declaration for ‘><>’ ClassOperator.hs:12:3: error: • Could not deduce (a ><> b0) from the context: a ><> b bound by the type signature for: (>**) :: (a ><> b) => a -> a -> () at ClassOperator.hs:12:3-44 The type variable ‘b0’ is ambiguous • In the ambiguity check for ‘>**’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes When checking the class method: (>**) :: forall a b. (a ><> b) => a -> a -> () In the class declaration for ‘><>’ ClassOperator.hs:12:3: error: • Could not deduce (a ><> b0) from the context: a ><> b bound by the type signature for: (<**) :: (a ><> b) => a -> a -> () at ClassOperator.hs:12:3-44 The type variable ‘b0’ is ambiguous • In the ambiguity check for ‘<**’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes When checking the class method: (<**) :: forall a b. (a ><> b) => a -> a -> () In the class declaration for ‘><>’ }}} This is a regression relative to 7.10.2, which accepts the program without error. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11264#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler