[GHC] #1451: Provide way to show the origin of a constraint

GHC trac at galois.com
Fri Jun 22 11:07:41 EDT 2007


#1451: Provide way to show the origin of a constraint
----------------------------------+-----------------------------------------
    Reporter:  iampure at gmail.com  |        Owner:         
        Type:  feature request    |       Status:  new    
    Priority:  normal             |    Milestone:         
   Component:  Compiler           |      Version:  6.6.1  
    Severity:  normal             |   Resolution:         
    Keywords:                     |   Difficulty:  Unknown
          Os:  Unknown            |     Testcase:         
Architecture:  Unknown            |  
----------------------------------+-----------------------------------------
Comment (by iampure at gmail.com):

 Ok, given a complete module that compiles, I would ideally like to do ask
 where the constraint MonadState (A b) (ST s) for example is generated.
 Since there doesn't exist such an instance, it's a bug in my program, but
 GHC only starts to complain when I call a function that needs that
 instance, but pointing to the location of the call is of little use in
 this case. The information that it needs MonadState (A b) (ST s) typically
 comes from GHC itself already, but me tracking down where exactly it gets
 used in that way(e.g. where the call to put or get is) is still my job.

 An IDE ideally would show in what layer of the monad transformer stack
 everything is executed, making finding such bugs trivial, instead of hard.
 Such an IDE will probably not exist for 20 years or it might not ever
 exist, but GHC providing such a feature would be a start.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1451>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


More information about the Glasgow-haskell-bugs mailing list