
#11115: Indicate missing associated type instances -------------------------------------+------------------------------------- Reporter: rimmington | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.10.2 checker) | 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): That's a good idea. But perhaps `PrefixExp Deci` isn't the villain! It is part of {{{ Data.Metrology.Suspicious.Poly.SplitPrefix (PrefixExp Deci) Deci Core }}} so perhaps the cause is a missing {{{ type instance SplitPrefix x Deci Core = ...x.... }}} I suppose that a possible heuristic would be this: * When reporting a "cant-match" error with `F t1 .. tn ~ ty`, where `F` is a type function, generate a "stuck-heuristic" message for `F t1 .. tn`. To generate a "stuck-heuristic" message for `F t1 .. tn`, * see if the call is "surely apart" from all the instances of `F`. (See our closed-type family paper for "surely-apart".) * If so, report that there is no instance for `F t1 .. tn`. * If not, find a type-function application in `t1 .. tn` (say `G s1 .. sm`) that, if reduced, could perhaps make `F t1 .. tn` fire, if any such application exists. * And generate a stuck-heruristic message for `G s1 .. sm` -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11115#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler