#7066: isInstance does not work for compound types ---------------------------------+------------------------------------------ Reporter: edsko | Owner: simonpj Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.4.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------
Comment(by edsko): Yes, I guess that's the tricky case -- but this problem already exists. isInstance just checks if reifyInstances doesn't return the empty list; so reifyInstances for Show (a, Int) could return {{{ Instance (Show a) => Instance (a, Int) }}} just like it returns {{{ Instance (Show a, Show b) => Instance (a, b) }}} now for that exact same argument. If 'isInstance' is not modified, then an answer of True would mean: ''this could be satisfied'' (if there are instances for the type variables), and for monomorphic types it would mean ''yes, this is satisfied''. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7066#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs