[GHC] #15044: Option to output instance resolution process

#15044: Option to output instance resolution process -------------------------------------+------------------------------------- Reporter: lyxia | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Keywords: | Operating System: Unknown/Multiple debug,typeclasses | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Would it be possible to see what instances get picked by the constraint solver? For example, see coq's `Set Typeclass Debug.`. The following comment also shows what it might look like: https://www.reddit.com/r/haskell/comments/8cmn4i/algorithmically_scrapping_y... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15044 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15044: Option to output instance resolution process -------------------------------------+------------------------------------- Reporter: lyxia | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: | debug,typeclasses Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12687 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * related: => #12687 Comment: Perhaps `-ddump-cs-trace`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15044#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15044: Option to output instance resolution process -------------------------------------+------------------------------------- Reporter: lyxia | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: | debug,typeclasses Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12687 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by lyxia): That looks like it! Is it not documented because it still needs work? I can see the constraints that must be solved at every step, but it would also be nice to see what instances actually get picked. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15044#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15044: Option to output instance resolution process -------------------------------------+------------------------------------- Reporter: lyxia | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: | debug,typeclasses Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12687 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): `-ddump-cs-trace` is really intended for people debugging the constraint solver, rather than programmers. But something very like it should work just fine. It just needs someone to have a go... feel free to ask questions. I think the tricky bit would be identifying the constraint being solved in a way that is meaningful to the programmer. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15044#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC