
#12526: regression in type inference with respect to type families -------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: 10634 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by niteria): Adding: {{{ {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE FlexibleContexts #-} }}} produces a different message: {{{ InjectiveInference.hs:36:8: error: • Could not deduce: ProcessOf t0 ~ ProcessOf t from the context: CausalProcess (ProcessOf t) bound by the inferred type for ‘osci’: CausalProcess (ProcessOf t) => ProcessOf t Float y at InjectiveInference.hs:36:8-26 Expected type: ProcessOf t Float y Actual type: ProcessOf t0 Float y NB: ‘ProcessOf’ is a type function, and may not be injective The type variable ‘t0’ is ambiguous • In the ambiguity check for the inferred type for ‘osci’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes When checking the inferred type osci :: forall y (t :: * -> *). CausalProcess (ProcessOf t) => ProcessOf t Float y In the expression: let osci = shapeModOsci in osci $& frequencies }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12526#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler